Revert "Revert "Dashboard: Always replace title""

This reverts commit d1f13819e4.

Please do not ask. This was no syntax error.
This commit is contained in:
Marius Hein 2015-02-02 12:04:28 +01:00
parent d1f13819e4
commit 190c1e8f04
1 changed files with 5 additions and 4 deletions

View File

@ -708,11 +708,12 @@
// $container.html(content);
} else {
if ($container.closest('.dashboard').length &&
! $('h1', $content).length
if ($container.closest('.dashboard').length
) {
var title = $('h1', $container).first().detach();
$('h1', $content).first().detach();
if (! $('h1', $content).length) {
var title = $('h1', $container).first().detach();
$('h1', $content).first().detach();
}
$container.html(title).append(content);
} else if (action === 'replace') {
$container.html(content);