diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-01-17 11:49:48 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-01-17 11:49:48 +0100 |
commit | e6981d344549cb858d3279a720f31e1ac9036b09 (patch) | |
tree | c439102ddc9942ae42f0a458a6691192cc7de460 /ishtar_common/static/js/ishtar.js | |
parent | f95dd5e8b308938c2e02db657d7b32c483102a02 (diff) | |
download | Ishtar-e6981d344549cb858d3279a720f31e1ac9036b09.tar.bz2 Ishtar-e6981d344549cb858d3279a720f31e1ac9036b09.zip |
UI: modal waiting
Diffstat (limited to 'ishtar_common/static/js/ishtar.js')
-rw-r--r-- | ishtar_common/static/js/ishtar.js | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index 840d588f3..8794fc722 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -59,7 +59,7 @@ var shortcut_menu_hide_url = '/hide-shortcut-menu/' var shortcut_menu_show_url = '/show-shortcut-menu/' function init_shortcut_menu(html){ - $("#progress").hide(); + $('.modal-progress').modal('hide'); $("#context-menu").html(html); $(".chosen-select").chosen(); if (advanced_menu) { @@ -186,7 +186,7 @@ function display_info(msg){ function load_shortcut_menu(){ if (!shortcut_url) return; - $("#progress").show(); + $('.modal-progress').modal('show'); $.ajax({ url: shortcut_url, cache: false, @@ -194,7 +194,7 @@ function load_shortcut_menu(){ init_shortcut_menu(html); }, error:function(XMLHttpRequest, textStatus, errorThrows){ - $("#progress").hide(); + $('.modal-progress').modal('hide'); } }); } @@ -248,12 +248,11 @@ $(document).on("click", '.help_display', function(){ }); $(document).on("click", '#progress-content', function(){ - $('#progress').hide(); + $('.modal-progress').hide(); }); function long_wait(){ - $('#progress').addClass('long'); - $('#progress').show(); + $('.modal-progress').modal('show'); $('.progress-1').show('slow'); setTimeout(function(){ $('.progress-1').hide('slow'); @@ -276,12 +275,12 @@ function long_wait(){ var last_window; function load_window(url, speed, on_success, no_jump){ - $("#progress").show(); + $('.modal-progress').modal('show'); $.ajax({ url: url, cache: false, success:function(html){ - $("#progress").hide(); + $('.modal-progress').modal('hide'); $(".previous_page").remove(); $(".next_page").remove(); var register_id = $(html).find(".card-header").attr("data-sheet-id"); @@ -302,7 +301,7 @@ function load_window(url, speed, on_success, no_jump){ if (on_success) on_success(); }, error:function(XMLHttpRequest, textStatus, errorThrows){ - $("#progress").hide(); + $('.modal-progress').modal('hide'); } }); } @@ -322,15 +321,15 @@ function load_current_window(url, model_name){ } function load_url(url){ - $("#progress").show(); + $('.modal-progress').modal('show'); $.ajax({ url: url, cache: false, success:function(html){ - $("#progress").hide(); + $('.modal-progress').modal('hide'); }, error:function(XMLHttpRequest, textStatus, errorThrows){ - $("#progress").hide(); + $('.modal-progress').modal('hide'); } }); } |