Skip to content

Commit

Permalink
Merge pull request #4522 from tractorcow/pulls/3.2/bulk-smash
Browse files Browse the repository at this point in the history
BUG Fix bulk actions making sitetree unclickable
  • Loading branch information
dhensby committed Aug 21, 2015
2 parents 6bba01a + 0f81d5e commit 28ca23c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion admin/javascript/LeftAndMain.BatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@
// the native dropdown
setTimeout(function() { batchactions.addClass('inactive'); }, 100);
}

// Refresh selected / enabled nodes
$('#Form_BatchActionsForm').refreshSelected();
},

/**
Expand Down Expand Up @@ -236,6 +239,7 @@
st = this.getTree(),
ids = this.getIDs(),
allIds = [],
viewMode = $('.cms-content-batchactions :input[name=view-mode-batchactions]'),
selectedAction = this.find(':input[name=Action]').val();

// Default to refreshing the entire tree
Expand All @@ -246,7 +250,7 @@
}

// If no action is selected, enable all nodes
if(selectedAction == -1) {
if(!selectedAction || selectedAction == -1 || !viewMode.is(":checked")) {
$(rootNode).find('li').each(function() {
$(this).setEnabled(true);
});
Expand Down

0 comments on commit 28ca23c

Please sign in to comment.