admin: Fix toast that wasn't hidden on button click

This commit is contained in:
nemunaire 2022-05-26 11:37:43 +02:00
parent 123467f3eb
commit 4b2625c47d
1 changed files with 5 additions and 2 deletions

View File

@ -156,13 +156,16 @@ angular.module("FICApp")
else
$element.children(0).toast({delay: this.timeout});
$element.children(0).toast('show');
$element.children(0).on('hidden.bs.toast', function() {
$element.children(0).toast('dispose');
});
this.yesFunc = function() {
$element.children(0).toast('dispose');
$element.children(0).toast('hide');
if (this.onyes)
this.onyes();
}
this.noFunc = function() {
$element.children(0).toast('dispose');
$element.children(0).toast('hide');
if (this.onno)
this.onno();
}