[FIX] web: don't duplicate alert while backup

When you backup 3 dbs with the database manager, you had 3 times the warning.

Underscore is not loaded, so _.once not available.
This commit closes #13173
This commit is contained in:
Jeremy Kersten
2016-08-19 15:34:58 +02:00
parent 0122c05eff
commit 0d491775c5
+3 -1
View File
@@ -32,7 +32,9 @@
var modal = $(this).parentsUntil('body', '.modal');
if (modal.hasClass('o_database_backup')) {
$(modal).modal('hide');
$('.list-group').before("<div class='alert alert-info'>The backup may take some time before being ready</div>");
if (!$('.alert-backup-long').length) {
$('.list-group').before("<div class='alert alert-info alert-backup-long'>The backup may take some time before being ready</div>");
}
}
});
});