Skip to content
Permalink
Browse files

added removeOnDismiss option to the fireModal API

  • Loading branch information...
nauvalazhar committed Jun 3, 2019
1 parent 14f2020 commit ab90493b7b5a1106e22319eb3b53ed6ac8827ef5
Showing with 7 additions and 4 deletions.
  1. +7 −4 assets/js/stisla.js
@@ -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;
});

0 comments on commit ab90493

Please sign in to comment.
You can’t perform that action at this time.