mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
Assure that rows are refreshed correctly on reload
Assure that all links are initialized when the selection is applied after a request. Move action table code into the actiontable behavior. refs #8623
This commit is contained in:
parent
a14da1c558
commit
f2d253f508
@ -381,6 +381,20 @@
|
|||||||
var container = evt.target;
|
var container = evt.target;
|
||||||
var self = evt.data.self;
|
var self = evt.data.self;
|
||||||
|
|
||||||
|
// Set first links href in a action table tr as row href:
|
||||||
|
$('table.action tr', container).each(function(idx, el) {
|
||||||
|
var $a = $('a[href].rowaction', el).first();
|
||||||
|
if ($a.length) {
|
||||||
|
// TODO: Find out whether we leak memory on IE with this:
|
||||||
|
$(el).attr('href', $a.attr('href'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$a = $('a[href]', el).first();
|
||||||
|
if ($a.length) {
|
||||||
|
$(el).attr('href', $a.attr('href'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// draw all selections
|
// draw all selections
|
||||||
self.tables().each(function(i, el) {
|
self.tables().each(function(i, el) {
|
||||||
new Selection(el, self.icinga).refresh();
|
new Selection(el, self.icinga).refresh();
|
||||||
|
@ -40,20 +40,6 @@
|
|||||||
icinga.loader.loadUrl(url, $(el)).autorefresh = true;
|
icinga.loader.loadUrl(url, $(el)).autorefresh = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set first links href in a action table tr as row href:
|
|
||||||
$('table.action tr', el).each(function(idx, el) {
|
|
||||||
var $a = $('a[href].rowaction', el).first();
|
|
||||||
if ($a.length) {
|
|
||||||
// TODO: Find out whether we leak memory on IE with this:
|
|
||||||
$(el).attr('href', $a.attr('href'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$a = $('a[href]', el).first();
|
|
||||||
if ($a.length) {
|
|
||||||
$(el).attr('href', $a.attr('href'));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('td.state span.timesince').attr('title', null);
|
$('td.state span.timesince').attr('title', null);
|
||||||
|
|
||||||
var moduleName = el.data('icingaModule');
|
var moduleName = el.data('icingaModule');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user