Merge pull request #4522 from tractorcow/pulls/3.2/bulk-smash

BUG Fix bulk actions making sitetree unclickable
This commit is contained in:
Daniel Hensby 2015-08-21 09:30:00 +01:00
commit 28ca23c4ee

View File

@ -174,6 +174,9 @@
// the native dropdown // the native dropdown
setTimeout(function() { batchactions.addClass('inactive'); }, 100); setTimeout(function() { batchactions.addClass('inactive'); }, 100);
} }
// Refresh selected / enabled nodes
$('#Form_BatchActionsForm').refreshSelected();
}, },
/** /**
@ -236,6 +239,7 @@
st = this.getTree(), st = this.getTree(),
ids = this.getIDs(), ids = this.getIDs(),
allIds = [], allIds = [],
viewMode = $('.cms-content-batchactions :input[name=view-mode-batchactions]'),
selectedAction = this.find(':input[name=Action]').val(); selectedAction = this.find(':input[name=Action]').val();
// Default to refreshing the entire tree // Default to refreshing the entire tree
@ -246,7 +250,7 @@
} }
// If no action is selected, enable all nodes // If no action is selected, enable all nodes
if(selectedAction == -1) { if(!selectedAction || selectedAction == -1 || !viewMode.is(":checked")) {
$(rootNode).find('li').each(function() { $(rootNode).find('li').each(function() {
$(this).setEnabled(true); $(this).setEnabled(true);
}); });