diff options
Diffstat (limited to 'ishtar_common/static/js/ishtar.js')
-rw-r--r-- | ishtar_common/static/js/ishtar.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index 2bcfe5a7e..1ef2e4c1d 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -454,8 +454,29 @@ $(document).ready(function(){ $("[aria-controls='" + $(this).attr("id") + "']").click(); } }); + register_modal_on_close(); }); + +var modal_on_close = new Array(); + +var register_modal_on_close = function(){ + $(".modal").each( + function(){ + if (this.id) { + modal_on_close[this.id] = undefined; + $("#" + this.id).on('hide.bs.modal', function() { + if (modal_on_close[this.id] !== undefined){ + modal_on_close[this.id](); + // reinitialize after call + modal_on_close[this.id] = undefined; + } + }); + } + } + ); +} + var register_wait_button = function(){ $(".wait-button").click(function(){short_wait()}); }; |