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:
Matthias Jentsch 2015-07-27 10:34:17 +02:00
parent a14da1c558
commit f2d253f508
2 changed files with 14 additions and 14 deletions

View File

@ -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();

View File

@ -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');