Skip to content

Commit

Permalink
Remove single selections correctly when going back in the history
Browse files Browse the repository at this point in the history
  • Loading branch information
majentsch committed Jul 28, 2015
1 parent 8dbd671 commit cbb9ef1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions public/js/icinga/behavior/actiontable.js
Expand Up @@ -397,6 +397,13 @@
$(container).find('.selection-info-count').text(table.selections().size());
};

ActionTable.prototype.clearAll = function () {
var self = this;
this.tables().each(function () {
new Selection(this, self.icinga).clear();
});
};

Icinga.Behaviors.ActionTable = ActionTable;

}) (Icinga, jQuery);
1 change: 0 additions & 1 deletion public/js/icinga/events.js
Expand Up @@ -427,7 +427,6 @@
} else {
icinga.ui.layout1col();
}
$('table tr[href].active').removeClass('active');
icinga.history.pushCurrentState();
}
}
Expand Down
3 changes: 3 additions & 0 deletions public/js/icinga/ui.js
Expand Up @@ -241,6 +241,9 @@
$('#layout').removeClass('twocols');
this.closeContainer($('#col2'));
this.disableCloseButtons();

// one-column layouts never have any selection active
this.icinga.behaviors.actiontable.clearAll();
},

closeContainer: function($c) {
Expand Down

0 comments on commit cbb9ef1

Please sign in to comment.