loader.js: Still apply some accessibility changes..
..if a renderHook discards an autorefresh. There is unfortunately no way to distinguish between a renderHook that really discards changes or one that applies them on the DOM itself. If it's the first, this change *shouldn't* hurt. If it's the latter, users should benefit.
This commit is contained in:
parent
e65ec1900a
commit
a8be92c245
|
@ -1247,25 +1247,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (discard) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: We do not want to wrap this twice...
|
|
||||||
var $content = $('<div>' + content + '</div>');
|
|
||||||
|
|
||||||
$('.container', $container).each(function() {
|
$('.container', $container).each(function() {
|
||||||
_this.stopPendingRequestsFor($(this));
|
_this.stopPendingRequestsFor($(this));
|
||||||
});
|
});
|
||||||
|
|
||||||
if (false &&
|
if (! discard) {
|
||||||
$('.dashboard', $content).length > 0 &&
|
|
||||||
$('.dashboard', $container).length === 0
|
|
||||||
) {
|
|
||||||
// $('.dashboard', $content)
|
|
||||||
// $container.html(content);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if ($container.closest('.dashboard').length) {
|
if ($container.closest('.dashboard').length) {
|
||||||
var title = $('h1', $container).first().detach();
|
var title = $('h1', $container).first().detach();
|
||||||
$container.html(title).append(content);
|
$container.html(title).append(content);
|
||||||
|
@ -1275,9 +1262,10 @@
|
||||||
$container.append(content);
|
$container.append(content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.icinga.ui.assignUniqueContainerIds();
|
this.icinga.ui.assignUniqueContainerIds();
|
||||||
|
|
||||||
if (navigationAnchor) {
|
if (! discard && navigationAnchor) {
|
||||||
setTimeout(this.icinga.ui.focusElement.bind(this.icinga.ui), 0, navigationAnchor, $container);
|
setTimeout(this.icinga.ui.focusElement.bind(this.icinga.ui), 0, navigationAnchor, $container);
|
||||||
} else if (! activeElementPath) {
|
} else if (! activeElementPath) {
|
||||||
// Active element was not in this container
|
// Active element was not in this container
|
||||||
|
|
Loading…
Reference in New Issue