mirror of
https://github.com/stisla/stisla.git
synced 2025-08-31 20:02:00 +02:00
added removeOnDismiss option to the fireModal API
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
body: '',
|
||||
buttons: [],
|
||||
autoFocus: true,
|
||||
removeOnDismiss: false,
|
||||
created: function() {},
|
||||
appended: function() {},
|
||||
onFormSubmit: function() {},
|
||||
@@ -153,11 +154,13 @@
|
||||
}
|
||||
|
||||
$(document).on("click", '.' + trigger_class, function() {
|
||||
$('#' + id).modal(options.modal);
|
||||
let modal = $('#' + id).modal(options.modal);
|
||||
|
||||
modal.on('hidden.bs.modal', function() {
|
||||
modal.remove();
|
||||
});
|
||||
if(options.removeOnDismiss) {
|
||||
modal.on('hidden.bs.modal', function() {
|
||||
modal.remove();
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
Reference in New Issue
Block a user