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

View File

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