Last change
on this file since 27047 was
26114,
checked in by mistic100, 11 years ago
|
[elegant] changing configuration while the menu is hidden generates content overlap
|
File size:
1.5 KB
|
Line | |
---|
1 | (function() { |
---|
2 | var session_storage = window.sessionStorage || {}; |
---|
3 | |
---|
4 | var menubar=jQuery("#menubar"), |
---|
5 | menuswitcher=jQuery("#menuSwitcher"), |
---|
6 | content=jQuery("#the_page > .content"), |
---|
7 | pcontent=jQuery("#content"); |
---|
8 | |
---|
9 | function hideMenu(delay) { |
---|
10 | menubar.hide(delay); |
---|
11 | menuswitcher.addClass("menuhidden").removeClass("menushown"); |
---|
12 | content.addClass("menuhidden").removeClass("menushown"); |
---|
13 | pcontent.addClass("menuhidden").removeClass("menushown"); |
---|
14 | session_storage['page-menu'] = 'hidden'; |
---|
15 | } |
---|
16 | |
---|
17 | function showMenu(delay) { |
---|
18 | menubar.show(delay); |
---|
19 | menuswitcher.addClass("menushown").removeClass("menuhidden"); |
---|
20 | content.addClass("menushown").removeClass("menuhidden"); |
---|
21 | pcontent.addClass("menushown").removeClass("menuhidden"); |
---|
22 | session_storage['page-menu'] = 'visible'; |
---|
23 | } |
---|
24 | |
---|
25 | jQuery(function(){ |
---|
26 | if (menubar.length == 1 && p_main_menu!="disabled") { |
---|
27 | menuswitcher.html('<div class="switchArrow"> </div>'); |
---|
28 | |
---|
29 | if (session_storage['page-menu'] == undefined && p_main_menu == 'off') { |
---|
30 | session_storage['page-menu'] = 'hidden'; |
---|
31 | } |
---|
32 | |
---|
33 | if (session_storage['page-menu'] == 'hidden') { |
---|
34 | hideMenu(0); |
---|
35 | } |
---|
36 | else { |
---|
37 | showMenu(0); |
---|
38 | } |
---|
39 | |
---|
40 | menuswitcher.click(function(e){ |
---|
41 | if (menubar.is(":hidden")) { |
---|
42 | showMenu(0); |
---|
43 | } |
---|
44 | else { |
---|
45 | hideMenu(0); |
---|
46 | } |
---|
47 | e.preventDefault(); |
---|
48 | }); |
---|
49 | } |
---|
50 | else if (menubar.length == 1 && p_main_menu=="disabled") { |
---|
51 | showMenu(0); |
---|
52 | } |
---|
53 | }); |
---|
54 | }()); |
---|
Note: See
TracBrowser
for help on using the repository browser.