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 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
|
||||
self.tables().each(function(i, el) {
|
||||
new Selection(el, self.icinga).refresh();
|
||||
|
|
|
@ -40,20 +40,6 @@
|
|||
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);
|
||||
|
||||
var moduleName = el.data('icingaModule');
|
||||
|
|
Loading…
Reference in New Issue