BUG Fix regressions in changes to batch action feature

This commit is contained in:
David Craig 2015-06-16 10:52:42 +12:00 committed by Damian Mooyman
parent 953b518403
commit ca039e15ef
2 changed files with 6 additions and 8 deletions

View File

@ -131,7 +131,11 @@ class CMSBatchActionHandler extends RequestHandler {
$ids = $this->cleanIDs($csvIDs);
// Filter by applicable pages
$applicableIDs = $actionHandler->applicablePages($ids);
if($ids) {
$applicableIDs = $actionHandler->applicablePages($ids);
} else {
$applicableIDs = array();
}
$response = new SS_HTTPResponse(json_encode($applicableIDs));
$response->addHeader("Content-type", "application/json");

View File

@ -339,6 +339,7 @@
tree.addClass('multiple');
tree.removeClass('draggable');
form.serializeFromTree();
$('#Form_BatchActionsForm').refreshSelected();
} else {
tree.removeClass('multiple');
tree.addClass('draggable');
@ -350,13 +351,6 @@
* Class: #Form_BatchActionsForm :select[name=Action]
*/
$('#Form_BatchActionsForm select[name=Action]').entwine({
onmatch: function() {
this.trigger('change');
this._super();
},
onunmatch: function() {
this._super();
},
onchange: function(e) {
var form = $(e.target.form),
btn = form.find(':submit'),