diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-11-08 20:33:26 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-11-08 20:34:08 +0100 | 
| commit | 3555eccdccc0ea67459fabf0a12b85e31b017758 (patch) | |
| tree | daa9339b15c8037f87c3601894476d5fe2f51a4e /ishtar_common/static/js/ishtar.js | |
| parent | a8172b647980667bef078c865034b52f6523be4b (diff) | |
| download | Ishtar-3555eccdccc0ea67459fabf0a12b85e31b017758.tar.bz2 Ishtar-3555eccdccc0ea67459fabf0a12b85e31b017758.zip | |
Allow deactivation of "auto-pin" and of "pin menu" in the profile (refs #4307)
Diffstat (limited to 'ishtar_common/static/js/ishtar.js')
| -rw-r--r-- | ishtar_common/static/js/ishtar.js | 32 | 
1 files changed, 18 insertions, 14 deletions
| diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index 9846b4f1a..b9e9d6844 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -41,6 +41,7 @@ function get_previous_table_id(){}  var datatable_submit_search = function() {};  var shortcut_url = ''; +var show_shortcut_menu = false;  var alert_url = '';  var debug = false;  var datatables_i18n; @@ -277,22 +278,25 @@ function load_opened_shortcut_menu(){  }  function load_shortcut_menu(opened){ -    if (!shortcut_url) return;      $('.modal-progress').modal('show'); -    $.ajax({ -        url: shortcut_url, -        cache: false, -        success:function(html){ -            init_shortcut_menu(html); -            load_alerts(); -            if(opened){ -                $("#dropdown-toggle-shortcut-menu").click(); +    if (show_shortcut_menu && shortcut_url){ +        $.ajax({ +            url: shortcut_url, +            cache: false, +            success:function(html){ +                init_shortcut_menu(html); +                load_alerts(); +                if(opened){ +                    $("#dropdown-toggle-shortcut-menu").click(); +                } +            }, +            error:function(XMLHttpRequest, textStatus, errorThrows){ +                close_wait();              } -        }, -        error:function(XMLHttpRequest, textStatus, errorThrows){ -            close_wait(); -        } -    }); +        }); +    } else { +        load_alerts(); +    }  }  var load_alerts = function(){ | 
