diff --git a/bulkManager/code/GridFieldBulkActionEditHandler.php b/bulkManager/code/GridFieldBulkActionEditHandler.php index 1103601..fedcc29 100644 --- a/bulkManager/code/GridFieldBulkActionEditHandler.php +++ b/bulkManager/code/GridFieldBulkActionEditHandler.php @@ -73,7 +73,7 @@ public function bulkEditForm() $actions->push( FormAction::create('doSave', _t('GRIDFIELD_BULKMANAGER_EDIT_HANDLER.SAVE_BTN_LABEL', 'Save all')) ->setAttribute('id', 'bulkEditingSaveBtn') - ->addExtraClass('ss-ui-action-constructive') + ->addExtraClass('btn btn-success') ->setAttribute('data-icon', 'accept') ->setUseButtonTag(true) ); @@ -81,7 +81,7 @@ public function bulkEditForm() $actions->push( FormAction::create('Cancel', _t('GRIDFIELD_BULKMANAGER_EDIT_HANDLER.CANCEL_BTN_LABEL', 'Cancel')) ->setAttribute('id', 'bulkEditingUpdateCancelBtn') - ->addExtraClass('ss-ui-action-destructive cms-panel-link') + ->addExtraClass('btn btn-danger cms-panel-link') ->setAttribute('data-icon', 'decline') ->setAttribute('href', $one_level_up->Link) ->setUseButtonTag(true) diff --git a/bulkManager/code/GridFieldBulkManager.php b/bulkManager/code/GridFieldBulkManager.php index e54509b..b5ca5c4 100644 --- a/bulkManager/code/GridFieldBulkManager.php +++ b/bulkManager/code/GridFieldBulkManager.php @@ -299,16 +299,16 @@ public function getHTMLFragments($gridField) $dropDownActionsList = DropdownField::create('bulkActionName', '') ->setSource($actionsListSource) - ->setAttribute('class', 'bulkActionName no-change-track') + ->addExtraClass('bulkActionName no-change-track no-chosen') ->setAttribute('id', ''); $templateData = array( - 'Menu' => $dropDownActionsList->FieldHolder(), + 'Menu' => $dropDownActionsList, 'Button' => array( 'Label' => _t('GRIDFIELD_BULK_MANAGER.ACTION_BTN_LABEL', 'Go'), 'DataURL' => $gridField->Link('bulkAction'), 'Icon' => $this->config['actions'][$firstAction]['config']['icon'], - 'DataConfig' => htmlspecialchars(json_encode($actionsConfig), ENT_QUOTES, 'UTF-8'), + 'DataConfig' => json_encode($actionsConfig), ), 'Select' => array( 'Label' => _t('GRIDFIELD_BULK_MANAGER.SELECT_ALL_LABEL', 'Select all'), @@ -350,13 +350,13 @@ public function getURLHandlers($gridField) * but have more specific path defined * * @param GridField $gridField - * @param SS_HTTPRequest $request + * @param HTTPRequest $request * * @return mixed */ public function handleBulkAction($gridField, $request) { - $controller = $gridField->getForm()->Controller(); + $controller = $gridField->getForm()->getController(); foreach ($this->config['actions'] as $name => $data) { $handlerClass = $data['handler']; diff --git a/bulkManager/css/GridFieldBulkEditingForm.css b/bulkManager/css/GridFieldBulkEditingForm.css index d5aca2a..cfdea76 100644 --- a/bulkManager/css/GridFieldBulkEditingForm.css +++ b/bulkManager/css/GridFieldBulkEditingForm.css @@ -31,12 +31,14 @@ text-shadow: none; } .bulkEditingFieldHolder.updated .ui-accordion-header { background-color: #a4ca3a; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a4ca3a), color-stop(100%, #59781d)); - background-image: -webkit-linear-gradient(top, #a4ca3a 0%, #59781d 100%); - background-image: -moz-linear-gradient(top, #a4ca3a 0%, #59781d 100%); - background-image: -o-linear-gradient(top, #a4ca3a 0%, #59781d 100%); - background-image: -ms-linear-gradient(top, #a4ca3a 0%, #59781d 100%); - background-image: linear-gradient(top, #a4ca3a 0%, #59781d 100%); } + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a4ca3a), color-stop(100%, #59781D)); + background-image: -webkit-linear-gradient(top, #a4ca3a 0%, #59781D 100%); + background-image: -moz-linear-gradient(top, #a4ca3a 0%, #59781D 100%); + background-image: -o-linear-gradient(top, #a4ca3a 0%, #59781D 100%); + background-image: -ms-linear-gradient(top, #a4ca3a 0%, #59781D 100%); + background-image: linear-gradient(top, #a4ca3a 0%, #59781D 100%); } .bulkEditingFieldHolder.updated .ui-accordion-header a { color: #fff; text-shadow: none; } + +/*# sourceMappingURL=GridFieldBulkEditingForm.css.map */ diff --git a/bulkManager/css/GridFieldBulkEditingForm.css.map b/bulkManager/css/GridFieldBulkEditingForm.css.map new file mode 100644 index 0000000..3410ecf --- /dev/null +++ b/bulkManager/css/GridFieldBulkEditingForm.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": "AACA,eACA;EACC,KAAK,EAAE,IAAI;EACX,KAAK,EAAE,GAAG;EAEV,MAAM,EAAE,aAAa;EAErB,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,IAAI;;AAGlB,eACA;EACC,KAAK,EAAE,KAAK;EACZ,KAAK,EAAE,KAAK;EACZ,KAAK,EAAE,GAAG;EAEV,MAAM,EAAE,aAAa;EAErB,eAAe,EAAE,SAAS;EAC1B,UAAU,EAAE,KAAK;EACjB,MAAM,EAAE,OAAO;;AAGhB,uBACA;EACC,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EACX,KAAK,EAAE,IAAI;EAEX,sDACA;IACC,gBAAgB,EAAE,OAAO;IAEzB,gBAAgB,EAAE,8FAA8F;IAChH,gBAAgB,EAAE,sDAAsD;IACxE,gBAAgB,EAAE,mDAAmD;IACrE,gBAAgB,EAAE,iDAAiD;IACnE,gBAAgB,EAAE,kDAAkD;IACpE,gBAAgB,EAAE,8CAA8C;IAEhE,wDACA;MACC,KAAK,EAAE,IAAI;MACX,WAAW,EAAE,IAAI;EAInB,oDACA;IACC,gBAAgB,EAAE,OAAO;IAEzB,gBAAgB,EAAE,8FAA8F;IAChH,gBAAgB,EAAE,sDAAsD;IACxE,gBAAgB,EAAE,mDAAmD;IACrE,gBAAgB,EAAE,iDAAiD;IACnE,gBAAgB,EAAE,kDAAkD;IACpE,gBAAgB,EAAE,8CAA8C;IAEhE,sDACA;MACC,KAAK,EAAE,IAAI;MACX,WAAW,EAAE,IAAI", +"sources": ["GridFieldBulkEditingForm.scss"], +"names": [], +"file": "GridFieldBulkEditingForm.css" +} \ No newline at end of file diff --git a/bulkManager/css/GridFieldBulkManager.css b/bulkManager/css/GridFieldBulkManager.css index 1fc75eb..cd9c3e8 100644 --- a/bulkManager/css/GridFieldBulkManager.css +++ b/bulkManager/css/GridFieldBulkManager.css @@ -1,10 +1,12 @@ -.cms table.ss-gridfield-table tr.bulkManagerOptions th.bulkmanagerselect { +.cms table.grid-field__table tr.bulkManagerOptions th.bulkmanagerheading { + padding-left: 40px; } +.cms table.grid-field__table tr.bulkManagerOptions th.bulkmanagerselect { text-align: center; } - .cms table.ss-gridfield-table tr.bulkManagerOptions th.bulkmanagerselect input { + .cms table.grid-field__table tr.bulkManagerOptions th.bulkmanagerselect input { margin-left: 0; } -.cms table.ss-gridfield-table tr.bulkManagerOptions .title { +.cms table.grid-field__table tr.bulkManagerOptions .title { margin: 0 0 2px 2px; } -.cms table.ss-gridfield-table tr.bulkManagerOptions .dropdown { +.cms table.grid-field__table tr.bulkManagerOptions .dropdown { display: inline-block; border: none; box-shadow: none; @@ -12,17 +14,17 @@ margin: 0; color: #000; vertical-align: top; } -.cms table.ss-gridfield-table tr.bulkManagerOptions .doBulkActionButton .ui-button-text { +.cms table.grid-field__table tr.bulkManagerOptions .doBulkActionButton .ui-button-text { padding: 6px 0 5px 2.1em; } - .cms table.ss-gridfield-table tr.bulkManagerOptions .doBulkActionButton .ui-button-text .ui-button-text { + .cms table.grid-field__table tr.bulkManagerOptions .doBulkActionButton .ui-button-text .ui-button-text { padding: 0; } -.cms table.ss-gridfield-table tr.bulkManagerOptions .doBulkActionButton .loading .ui-icon { +.cms table.grid-field__table tr.bulkManagerOptions .doBulkActionButton .loading .ui-icon { background: transparent url(../../framework/images/network-save.gif) no-repeat 0 0; } -.cms table.ss-gridfield-table tbody .col-bulkSelect { +.cms table.grid-field__table tbody .col-bulkSelect { width: 25px; padding: 0 10px; text-align: center; } -.cms table.ss-gridfield-table tbody td a.tempDisabledEditLink { +.cms table.grid-field__table tbody td a.tempDisabledEditLink { background: url("../../framework/admin/images/btn-icon/document--pencil.png") no-repeat 2px 0px; display: inline-block; width: 20px; @@ -32,3 +34,5 @@ vertical-align: middle; background-position: 2px 0px; background-repeat: no-repeat no-repeat; } + +/*# sourceMappingURL=GridFieldBulkManager.css.map */ diff --git a/bulkManager/css/GridFieldBulkManager.css.map b/bulkManager/css/GridFieldBulkManager.css.map new file mode 100644 index 0000000..6bb71bf --- /dev/null +++ b/bulkManager/css/GridFieldBulkManager.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": "AAII,wEAAsB;EAClB,YAAY,EAAE,IAAI;AAGtB,uEACA;EACE,UAAU,EAAE,MAAM;EAElB,6EACA;IACE,WAAW,EAAE,CAAC;AAIlB,yDACA;EACE,MAAM,EAAE,WAAW;AAGrB,4DACA;EACE,OAAO,EAAE,YAAY;EACrB,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,IAAI;EAEhB,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CAAC;EAET,KAAK,EAAE,IAAI;EACX,cAAc,EAAE,GAAG;AAKnB,sFACA;EACE,OAAO,EAAE,eAAe;EAExB,sGACA;IACE,OAAO,EAAE,CAAC;AAId,wFACA;EACE,UAAU,EAAE,sEAAsE;AAOtF,kDACA;EACE,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,MAAM;EACf,UAAU,EAAE,MAAM;AAGpB,4DACA;EACE,UAAU,EAAE,mFAAmF;EAC/F,OAAO,EAAE,YAAY;EACrB,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,WAAW,EAAE,QAAQ;EACrB,QAAQ,EAAE,MAAM;EAChB,cAAc,EAAE,MAAM;EACtB,mBAAmB,EAAE,OAAO;EAC5B,iBAAiB,EAAE,mBAAmB", +"sources": ["GridFieldBulkManager.scss"], +"names": [], +"file": "GridFieldBulkManager.css" +} \ No newline at end of file diff --git a/bulkManager/css/GridFieldBulkManager.scss b/bulkManager/css/GridFieldBulkManager.scss index e13fd58..671177a 100644 --- a/bulkManager/css/GridFieldBulkManager.scss +++ b/bulkManager/css/GridFieldBulkManager.scss @@ -1,7 +1,11 @@ -.cms table.ss-gridfield-table +.cms table.grid-field__table { tr.bulkManagerOptions { + th.bulkmanagerheading { + padding-left: 40px; + } + th.bulkmanagerselect { text-align: center; @@ -17,7 +21,7 @@ margin: 0 0 2px 2px; } - .dropdown + .dropdown { display: inline-block; border: none; @@ -71,4 +75,4 @@ background-repeat: no-repeat no-repeat; } } -} \ No newline at end of file +} diff --git a/bulkManager/javascript/GridFieldBulkManager.js b/bulkManager/javascript/GridFieldBulkManager.js index 14329b8..edf16e3 100644 --- a/bulkManager/javascript/GridFieldBulkManager.js +++ b/bulkManager/javascript/GridFieldBulkManager.js @@ -1,5 +1,5 @@ -(function($) { - $.entwine('ss', function($) { +(function($) { + $.entwine('ss', function($) { $.entwine('colymba', function($) { @@ -34,14 +34,14 @@ onunmatch: function(){} }); - + /** * Bulkselect table cell behaviours */ $('td.col-bulkSelect').entwine({ onmatch: function(){ }, - onunmatch: function(){ + onunmatch: function(){ }, onmouseover: function(){ //disable default row click behaviour -> avoid navigation to edit form when clicking the checkbox @@ -59,20 +59,20 @@ } }); - + /** * Individual select checkbox behaviour */ $('td.col-bulkSelect input').entwine({ onmatch: function(){ }, - onunmatch: function(){ + onunmatch: function(){ }, onclick: function(e) { - $(this).parents('.ss-gridfield-table').find('input.bulkSelectAll').prop('checked', ''); + $(this).parents('.grid-field__table').find('input.bulkSelectAll').prop('checked', ''); } }); - + /** * Bulkselect checkbox behaviours @@ -80,35 +80,35 @@ $('input.bulkSelectAll').entwine({ onmatch: function(){ }, - onunmatch: function(){ + onunmatch: function(){ }, onclick: function() { var state = $(this).prop('checked'); - $(this).parents('.ss-gridfield-table') + $(this).parents('.grid-field__table') .find('td.col-bulkSelect input') .prop('checked', state) .trigger('change'); }, getSelectRecordsID: function() { - return $(this).parents('.ss-gridfield-table') + return $(this).parents('.grid-field__table') .find('td.col-bulkSelect input:checked') - .map(function() { + .map(function() { return parseInt( $(this).data('record') ) }) .get(); } }); - + /** * Bulk action dropdown behaviours */ $('select.bulkActionName').entwine({ onmatch: function(){ }, - onunmatch: function(){ + onunmatch: function(){ }, onchange: function(e) { @@ -136,10 +136,10 @@ else{ $btn.removeClass('ss-ui-action-destructive'); } - - } + + } }); - + /** * bulk action button behaviours @@ -147,7 +147,7 @@ $('.doBulkActionButton').entwine({ onmatch: function(){ }, - onunmatch: function(){ + onunmatch: function(){ }, getActionURL: function(action, url) { @@ -176,13 +176,13 @@ var $parent = $(this).parents('.bulkManagerOptions'), action = $parent.find('select.bulkActionName').val(), ids = $(this).parents('.bulkManagerOptions').find('input.bulkSelectAll:first').getSelectRecordsID() - ; + ; - this.doBulkAction(action, ids); + this.doBulkAction(action, ids); }, doBulkAction: function(action, ids, callbackFunction, callbackContext) - { + { var $parent = $(this).parents('.bulkManagerOptions'), $btn = $parent.find('a.doBulkActionButton'), @@ -190,7 +190,7 @@ url = this.getActionURL(action, $(this).data('url')), data = { records: ids } ; - + if ( ids.length <= 0 ) { alert( ss.i18n._t('GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT') ); @@ -207,10 +207,10 @@ callbackFunction.call(callbackContext, false); } return false; - } - } + } + } - $btn.addClass('loading'); + $btn.addClass('loading'); if ( config[action]['isAjax'] ) { @@ -219,7 +219,7 @@ data: data, type: "POST", context: $(this) - }).done(function(data, textStatus, jqXHR) { + }).done(function(data, textStatus, jqXHR) { $btn.removeClass('loading'); if ( callbackFunction && callbackContext ) { @@ -239,7 +239,7 @@ } }); - - }); + + }); }); }(jQuery)); diff --git a/bulkManager/templates/BulkManagerButtons.ss b/bulkManager/templates/BulkManagerButtons.ss index 7102b79..ac8f897 100644 --- a/bulkManager/templates/BulkManagerButtons.ss +++ b/bulkManager/templates/BulkManagerButtons.ss @@ -1,15 +1,25 @@ - - -

<% _t('GRIDFIELD_BULK_MANAGER.COMPONENT_TITLE', 'Modify one or more entry at a time.') %>

- - $Menu - - $Button.Label - - - - - - - \ No newline at end of file + +
+

<% _t('GRIDFIELD_BULK_MANAGER.COMPONENT_TITLE', 'Modify one or more entry at a time.') %>

+
+
+
+ $Menu + + $Button.Label + + +
+
+ + diff --git a/composer.json b/composer.json index 5fc23e0..27e61c6 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ }, "extra": { "branch-alias": { - "dev-feature/ss4-compat": "3.x-dev" + "dev-master": "3.x-dev" } }, "autoload": {