Permalink
Browse files

FIX action btn + loading indicator

.doBulkActionButton btn doesn't trigger cms actions and now has loading
indicator
  • Loading branch information...
1 parent 425cf9c commit 06e82405e5f656e0b9614d98b29f1a60d65edaea @colymba committed Dec 5, 2013
Showing with 9 additions and 1 deletion.
  1. +5 −0 css/GridFieldBulkManager.css
  2. +3 −0 javascript/GridFieldBulkManager.js
  3. +1 −1 templates/BulkManagerButtons.ss
@@ -30,6 +30,11 @@
vertical-align: top;
}
+.doBulkActionButton.loading .ui-icon
+{
+ background: transparent url(../../framework/images/network-save.gif) no-repeat 0 0;
+}
+
.cms table.ss-gridfield-table tbody td a.tempDisabledEditLink
{
background: url('../../framework/admin/images/btn-icon/document--pencil.png') no-repeat 2px 0px;
@@ -112,6 +112,8 @@
cacheBuster = new Date().getTime()
;
+ $btn.addClass('loading');
+
if ( ids.length <= 0 )
{
alert( ss.i18n._t('GridFieldBulkTools.BULKACTION_EMPTY_SELECT') );
@@ -130,6 +132,7 @@
context: $(this)
}).done(function() {
$(this).parents('.ss-gridfield').entwine('.').entwine('ss').reload();
+ $btn.removeClass('loading');
});
}
else{
@@ -2,7 +2,7 @@
<th class="extra bulkmanagerheading" colspan="$Colspan">
$Menu
- <a data-url="$Button.DataURL" data-config="$Button.DataConfig" class="doBulkActionButton action ss-ui-button cms-panel-link" data-icon="$Button.Icon">
+ <a data-url="$Button.DataURL" data-config="$Button.DataConfig" class="doBulkActionButton ss-ui-button" data-icon="$Button.Icon">
$Button.Label
</a>

0 comments on commit 06e8240

Please sign in to comment.