Dashboard: Always replace title
This is needed if an error occurs and the exception title was rendered into the container.
This commit is contained in:
parent
f9047e85c5
commit
c0c0e7d9e5
|
@ -708,11 +708,12 @@
|
||||||
// $container.html(content);
|
// $container.html(content);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ($container.closest('.dashboard').length &&
|
if ($container.closest('.dashboard').length
|
||||||
! $('h1', $content).length
|
|
||||||
) {
|
) {
|
||||||
|
if (! $('h1', $content).length) {
|
||||||
var title = $('h1', $container).first().detach();
|
var title = $('h1', $container).first().detach();
|
||||||
$('h1', $content).first().detach();
|
$('h1', $content).first().detach();
|
||||||
|
}
|
||||||
$container.html(title).append(content);
|
$container.html(title).append(content);
|
||||||
} else if (action === 'replace') {
|
} else if (action === 'replace') {
|
||||||
$container.html(content);
|
$container.html(content);
|
||||||
|
|
Loading…
Reference in New Issue