Revert "Dashboard: Always replace title"

This reverts commit c0c0e7d9e5.

Syntax error
This commit is contained in:
Marius Hein 2015-02-02 12:01:40 +01:00
parent c0c0e7d9e5
commit d1f13819e4
1 changed files with 4 additions and 5 deletions

View File

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