Fix batch action buttons state loosening

Now the batch button correctly reacts to toggling row checkboxes.

Change-Id: I28435cf5a396a83aaf471ded142db88f6a64ac5c
Closes-Bug: #1568063
This commit is contained in:
Timur Sufiev 2016-04-08 20:38:33 +03:00
parent ed8a39726b
commit ac63c15c94
1 changed files with 2 additions and 2 deletions

View File

@ -168,8 +168,8 @@ horizon.datatables = {
$form.each(function () {
var $this = $(this);
var $action_buttons = $this.find('.table_actions button[data-batch-action="true"]');
if (typeof disable_button == undefined) {
disable_button = $this.find(".table-row-multi-select").filter(":checked").length > 0;
if (disable_button === undefined) {
disable_button = $this.find(".table-row-multi-select").filter(":checked").length == 0;
}
$action_buttons.toggleClass("disabled", disable_button);
});