PHRAS-2760 #comment close submenu on click a div out of this #time 1h

This commit is contained in:
Harrys Ravalomanana
2019-11-13 18:37:02 +04:00
parent 0a4d597a58
commit d4de76662f

View File

@@ -302,8 +302,18 @@
$(document).ready(function () { $(document).ready(function () {
$('body').on('click', '#help-trigger', function (event) { $('body').on('click', '#help-trigger', function (event) {
$('#mainMenu .helpcontextmenu').toggleClass('shown'); $('#mainMenu .helpcontextmenu').toggleClass('shown');
console.log('mety');
}); });
$(document).on('click', function (e) {
if($('#mainMenu .helpcontextmenu').hasClass('shown')) {
var $this = $(e.target);
if ($this.closest('#mainMenu .helpcontextmenu.shown, .help-trigger').length == 0 && $this[0].id != "toggle") {
$('#mainMenu .helpcontextmenu').removeClass('shown');
}
}
});
// var key = 'help'; // var key = 'help';
var configurationSettingLinks = {{ configuration|json_encode|raw }}; var configurationSettingLinks = {{ configuration|json_encode|raw }};
//seperate array based on location of link //seperate array based on location of link