diff --git a/bulkManager/code/GridFieldBulkActionDeleteHandler.php b/bulkManager/code/GridFieldBulkActionDeleteHandler.php index fb29e4e..68dcc5d 100644 --- a/bulkManager/code/GridFieldBulkActionDeleteHandler.php +++ b/bulkManager/code/GridFieldBulkActionDeleteHandler.php @@ -9,16 +9,20 @@ class GridFieldBulkActionDeleteHandler extends GridFieldBulkActionHandler { /** - * List of action handling methods + * RequestHandler allowed actions + * @var array */ private static $allowed_actions = array('delete'); + /** - * URL handling rules. + * RequestHandler url => action map + * @var array */ private static $url_handlers = array( 'delete' => 'delete' ); + /** * Delete the selected records passed from the delete bulk action diff --git a/bulkManager/code/GridFieldBulkActionEditHandler.php b/bulkManager/code/GridFieldBulkActionEditHandler.php index 7e00b66..551eeac 100644 --- a/bulkManager/code/GridFieldBulkActionEditHandler.php +++ b/bulkManager/code/GridFieldBulkActionEditHandler.php @@ -9,13 +9,15 @@ class GridFieldBulkActionEditHandler extends GridFieldBulkActionHandler { /** - * List of action handling methods + * RequestHandler allowed actions + * @var array */ private static $allowed_actions = array('edit', 'update'); /** - * URL handling rules. + * RequestHandler url => action map + * @var array */ private static $url_handlers = array( 'bulkedit/update' => 'update', diff --git a/bulkManager/code/GridFieldBulkActionUnlinkHandler.php b/bulkManager/code/GridFieldBulkActionUnlinkHandler.php index 10c8e6f..1293627 100644 --- a/bulkManager/code/GridFieldBulkActionUnlinkHandler.php +++ b/bulkManager/code/GridFieldBulkActionUnlinkHandler.php @@ -9,17 +9,21 @@ class GridFieldBulkActionUnlinkHandler extends GridFieldBulkActionHandler { /** - * List of action handling methods + * RequestHandler allowed actions + * @var array */ private static $allowed_actions = array('unlink'); + /** - * URL handling rules. + * RequestHandler url => action map + * @var array */ private static $url_handlers = array( 'unlink' => 'unlink' ); + /** * Unlink the selected records passed from the unlink bulk action * diff --git a/bulkManager/code/GridFieldBulkManager.php b/bulkManager/code/GridFieldBulkManager.php index dc9c266..3f47007 100644 --- a/bulkManager/code/GridFieldBulkManager.php +++ b/bulkManager/code/GridFieldBulkManager.php @@ -11,7 +11,6 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr /** * component configuration * - * 'imageFieldName' => field name of the $has_one Model Image relation * 'editableFields' => fields editable on the Model * 'readOnlyFieldClasses' => field types that will be converted to readonly * 'fieldsNameBlacklist' => fields that will be removed from the automatic form generation @@ -34,6 +33,12 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr protected $readOnlyFieldClasses = array('GridField', 'UploadField'); + /** + * GridFieldBulkManager component constructor + * + * @param array $editableFields List of editable fields + * @param boolean $defaultActions Use default actions list. False to start fresh. + */ public function __construct($editableFields = null, $defaultActions = true) { if ( $editableFields != null ) $this->setConfig ( 'editableFields', $editableFields ); @@ -112,6 +117,7 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr return $this; } + /** * Returns one $config parameter of the full $config @@ -125,6 +131,7 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr else return $this->config; } + /** * Add a field to the editable fields blacklist * @@ -135,6 +142,7 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr { return array_push( $this->config['fieldsNameBlacklist'], $fieldName); } + /** * Add a class to the readonly list @@ -146,6 +154,7 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr { return array_push( $this->config['readOnlyFieldClasses'], $className); } + /** * Remove a field to the editable fields blacklist @@ -161,6 +170,7 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr return false; } } + /** * Remove a class to the readonly list @@ -269,6 +279,7 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr { if(!in_array('BulkSelect', $columns)) $columns[] = 'BulkSelect'; } + /** * Which columns are handled by the component @@ -280,6 +291,7 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr { return array('BulkSelect'); } + /** * Sets the column's content @@ -296,6 +308,7 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr ->setAttribute('data-record', $record->ID); return $cb->Field(); } + /** * Set the column's HTML attributes @@ -310,6 +323,7 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr return array('class' => 'col-bulkSelect'); } + /** * Set the column's meta data * @@ -401,6 +415,7 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr 'bulkaction' => 'handlebulkaction' ); } + /** * Pass control over to the RequestHandler @@ -436,4 +451,4 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr user_error("Unable to find matching bulk action handler for ".$request->remaining().'.', E_USER_ERROR); } -} +} \ No newline at end of file diff --git a/bulkUpload/code/GridFieldBulkUpload.php b/bulkUpload/code/GridFieldBulkUpload.php index 07f8bfe..82b9720 100644 --- a/bulkUpload/code/GridFieldBulkUpload.php +++ b/bulkUpload/code/GridFieldBulkUpload.php @@ -24,7 +24,9 @@ class GridFieldBulkUpload implements GridField_HTMLProvider, GridField_URLHandle 'sequentialUploads' => false ); + /** + * Component constructor * * @param string $fileRelationName * @param string/array $editableFields @@ -68,6 +70,7 @@ class GridFieldBulkUpload implements GridField_HTMLProvider, GridField_URLHandle $this->config[$reference] = $value; } + /** * Returns one $config parameter of the full $config * @@ -118,6 +121,7 @@ class GridFieldBulkUpload implements GridField_HTMLProvider, GridField_URLHandle return $configFileRelationName ? $configFileRelationName : $this->getDefaultFileRelationName($gridField); } + /** * Return the ClassName of the fileRelation * i.e. 'MyImage' => 'Image' will return 'Image' @@ -279,6 +283,7 @@ class GridFieldBulkUpload implements GridField_HTMLProvider, GridField_URLHandle ); } + /** * Pass control over to the RequestHandler * @@ -293,5 +298,4 @@ class GridFieldBulkUpload implements GridField_HTMLProvider, GridField_URLHandle return $handler->handleRequest($request, DataModel::inst()); } -} - +} \ No newline at end of file diff --git a/bulkUpload/code/GridFieldBulkUpload_Request.php b/bulkUpload/code/GridFieldBulkUpload_Request.php index fc3d2cd..6d9fdbe 100644 --- a/bulkUpload/code/GridFieldBulkUpload_Request.php +++ b/bulkUpload/code/GridFieldBulkUpload_Request.php @@ -1,11 +1,6 @@ action map + * @var array */ private static $url_handlers = array( '$Action!' => '$Action' ); + /** - * + * Handler's constructor + * * @param GridFIeld $gridField * @param GridField_URLHandler $component * @param Controller $controller diff --git a/bulkUpload/javascript/GridFieldBulkUpload.js b/bulkUpload/javascript/GridFieldBulkUpload.js index adc7a2d..bb3cb63 100644 --- a/bulkUpload/javascript/GridFieldBulkUpload.js +++ b/bulkUpload/javascript/GridFieldBulkUpload.js @@ -1,10 +1,5 @@ (function($) { $.entwine('ss', function($) { - - // start SS namespace overrides - - - // end SS namespace overrides $.entwine('colymba', function($) { @@ -74,17 +69,6 @@ }); - /** - * Track completed uploads - *//* - $('li.ss-uploadfield-item.done').entwine({ - onmatch: function(){ - this.parents('ul.ss-uploadfield-files').trackProgress(); - }, - onunmatch: function(){}, - });*/ - - /** * Update buttons state and progress info... */ @@ -282,4 +266,4 @@ }); // colymba namespace }); // ss namespace -}(jQuery)); +}(jQuery)); \ No newline at end of file diff --git a/bulkUpload/javascript/GridFieldBulkUpload_downloadtemplate.js b/bulkUpload/javascript/GridFieldBulkUpload_downloadtemplate.js index 91e258c..11a51cb 100644 --- a/bulkUpload/javascript/GridFieldBulkUpload_downloadtemplate.js +++ b/bulkUpload/javascript/GridFieldBulkUpload_downloadtemplate.js @@ -23,10 +23,8 @@ window.tmpl.cache['colymba-bulkuploaddownloadtemplate'] = tmpl( '
' + '' + '{% } else { %}' + - //'
{% print(file.buttons, true); %}
' + '{% } %}' + '' + '' + '{% } %}' -); -//'
' + +); \ No newline at end of file