mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 14:54:24 +02:00
actiontable.js: Only handle top-level containers
This commit is contained in:
parent
d7d31d00ea
commit
30326dd1bb
@ -348,8 +348,8 @@
|
|||||||
*/
|
*/
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
||||||
this.on('rendered', this.onRendered, this);
|
this.on('rendered', '#main > .container', this.onRendered, this);
|
||||||
this.on('beforerender', this.beforeRender, this);
|
this.on('beforerender', '#main > .container', this.beforeRender, this);
|
||||||
this.on('click', 'table.action tr[href], table.table-row-selectable tr[href]', this.onRowClicked, this);
|
this.on('click', 'table.action tr[href], table.table-row-selectable tr[href]', this.onRowClicked, this);
|
||||||
};
|
};
|
||||||
ActionTable.prototype = new Icinga.EventListener();
|
ActionTable.prototype = new Icinga.EventListener();
|
||||||
@ -436,6 +436,11 @@
|
|||||||
var container = evt.target;
|
var container = evt.target;
|
||||||
var _this = evt.data.self;
|
var _this = evt.data.self;
|
||||||
|
|
||||||
|
if (evt.currentTarget !== container) {
|
||||||
|
// Nested containers are ignored
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// initialize all rows with the correct row action
|
// initialize all rows with the correct row action
|
||||||
$('table.action tr, table.table-row-selectable tr', container).each(function(idx, el) {
|
$('table.action tr, table.table-row-selectable tr', container).each(function(idx, el) {
|
||||||
|
|
||||||
@ -475,6 +480,11 @@
|
|||||||
var container = evt.target;
|
var container = evt.target;
|
||||||
var _this = evt.data.self;
|
var _this = evt.data.self;
|
||||||
|
|
||||||
|
if (evt.currentTarget !== container) {
|
||||||
|
// Nested containers are ignored
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var active = _this.tables().find('tr.active');
|
var active = _this.tables().find('tr.active');
|
||||||
if (active.length) {
|
if (active.length) {
|
||||||
$(container).data('icinga-actiontable-former-href', active.attr('href'));
|
$(container).data('icinga-actiontable-former-href', active.attr('href'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user