mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #4524 from tractorcow/pulls/3/bulk-smash
BUG Fix bulk actions making sitetree unclickable
This commit is contained in:
commit
bb15307a8f
@ -170,6 +170,7 @@
|
|||||||
st = this.getTree(),
|
st = this.getTree(),
|
||||||
ids = this.getIDs(),
|
ids = this.getIDs(),
|
||||||
allIds = [],
|
allIds = [],
|
||||||
|
viewMode = $('.cms-content-batchactions-button'),
|
||||||
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
|
||||||
@ -180,7 +181,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If no action is selected, enable all nodes
|
// If no action is selected, enable all nodes
|
||||||
if(!selectedAction || selectedAction == -1) {
|
if(!selectedAction || selectedAction == -1 || !viewMode.hasClass('active')) {
|
||||||
$(rootNode).find('li').each(function() {
|
$(rootNode).find('li').each(function() {
|
||||||
$(this).setEnabled(true);
|
$(this).setEnabled(true);
|
||||||
});
|
});
|
||||||
@ -354,11 +355,12 @@
|
|||||||
tree.addClass('multiple');
|
tree.addClass('multiple');
|
||||||
tree.removeClass('draggable');
|
tree.removeClass('draggable');
|
||||||
form.serializeFromTree();
|
form.serializeFromTree();
|
||||||
$('#Form_BatchActionsForm').refreshSelected();
|
|
||||||
} else {
|
} else {
|
||||||
tree.removeClass('multiple');
|
tree.removeClass('multiple');
|
||||||
tree.addClass('draggable');
|
tree.addClass('draggable');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('#Form_BatchActionsForm').refreshSelected();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user