js/loader: correctly get rid of data
I'm unsure whether this is a jQuery bug or not. The removeData() function has no effect unless there is a matching data attribute. Makes IMO no sense, as adding the attribute automagically adds data, so why should removing it differ. This patch makes sure that the corresponding attribute is removed too. Fixes "dashboard sometimes flickering on refresh". refs #6536
This commit is contained in:
parent
49c679fe0f
commit
329b1cf960
|
@ -394,6 +394,9 @@
|
|||
classes.push('module-' + moduleName);
|
||||
} else {
|
||||
req.$target.removeData('icingaModule');
|
||||
if (req.$target.attr('data-icinga-module')) {
|
||||
req.$target.removeAttr('data-icinga-module');
|
||||
}
|
||||
}
|
||||
req.$target.attr('class', classes.join(' '));
|
||||
|
||||
|
@ -407,6 +410,9 @@
|
|||
req.$target.data('icingaRefresh', refresh);
|
||||
} else {
|
||||
req.$target.removeData('icingaRefresh');
|
||||
if (req.$target.attr('data-icinga-refresh')) {
|
||||
req.$target.removeAttr('data-icinga-refresh');
|
||||
}
|
||||
}
|
||||
|
||||
// Set a window identifier if the server asks us to do so
|
||||
|
|
Loading…
Reference in New Issue