diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-10-10 13:42:18 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-10-14 16:48:37 +0200 |
commit | 435797a54e4d322a46711f303c2fc1fd5286330e (patch) | |
tree | 7c209135a17fe9b12fa2e2e844f345debed45d97 /ishtar_common/static/js | |
parent | 69df0a88eeaafeee81d76a3307e79fe5cad8ecf8 (diff) | |
download | Ishtar-435797a54e4d322a46711f303c2fc1fd5286330e.tar.bz2 Ishtar-435797a54e4d322a46711f303c2fc1fd5286330e.zip |
✨ site and operation relations forms refactoring
Diffstat (limited to 'ishtar_common/static/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()}); }; |