1
0
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:
Muhamad Nauval Azhar
2019-06-03 14:52:35 +07:00
parent 14f20203df
commit ab90493b7b

View File

@@ -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;
});