source: extensions/greydragon/js/theme.menu.js @ 30210

Last change on this file since 30210 was 30210, checked in by SergeD, 10 years ago

version 1.0.13
+ New colorpack - GreyDragon
+ ADMIN: Added support for horizontal menu - "Static Menu - Header Bottom". When used with Additional Pages Plugin, pages except Root Page would be embeded

into menu bar instead of drop down menu.

+ ADMIN: Added option "Display navigation arrows" for Root page
+ ADMIN: Added option "Display navigation controls" for Root page
+ Added support for thumb shadow space - custom CSS is required (please refer to help section in admin area). Latest gdThumb is recomended.
+ CSS: cleanup

  • Removed hardcoded height for root page slideshow to accomodate navigation controls
  • Fixed issues with Categories List overlapping when Static menu is enabled
  • In Phote page, hide overflow photo when huge size is used
  • Property svn:eol-style set to native
File size: 2.3 KB
Line 
1(function() {
2
3  var menubar=jQuery("#menubar"),
4      menuswitcher = null,
5      content=jQuery("#the_page > .content"),
6      pcontent=jQuery("#content");
7
8  // static, opened, closed, disabled
9
10  function hideMenu(delay) {
11    if ((p_animated_menu == "on")  && (delay != 0)) {
12      jQuery("#menubar").fadeOut("fast");
13    } else {
14      jQuery("#menubar").hide();
15    }
16
17    menuswitcher.addClass("menuhidden").removeClass("menushown");
18    content.addClass("menuhidden").removeClass("menushown");
19    pcontent.addClass("menuhidden").removeClass("menushown");
20
21    jQuery.cookie('side-menu', 'hidden', {path: "/"});
22  }
23
24  function showMenu(delay) {
25    if ((p_animated_menu == "on") && (delay != 0)) {
26      jQuery("#menubar").fadeIn("fast");
27    } else {
28      jQuery("#menubar").show();
29    }
30
31    menuswitcher.addClass("menushown").removeClass("menuhidden");
32    content.addClass("menushown").removeClass("menuhidden");
33    pcontent.addClass("menushown").removeClass("menuhidden");
34
35    jQuery.cookie('side-menu', 'visible', {path: "/"});
36  }
37
38  jQuery(function(){
39
40    if (p_hideabout) { jQuery('a[href$="about.php"]').parent().remove(); }
41
42    if (p_main_menu == 'static') { 
43      var mh = jQuery('#menubar').height();
44      jQuery('.contentWithMenu').css("min-height", mh + 20);
45      jQuery('#menubar').css("display", "block"); 
46      return; 
47    } else if (p_main_menu == 'header-bottom') {
48    } else if (p_main_menu !== 'disabled') {
49      jQuery('<span id="menuSwitcher">&nbsp;</span>').insertBefore('div.titrePage h2 a:first');
50      menuswitcher = jQuery("#menuSwitcher");
51    }
52
53    if (menubar.length == 1 && p_main_menu != "disabled" && p_main_menu != 'header-bottom') {
54      if (jQuery.cookie('side-menu') == undefined) {
55        if (p_main_menu == 'opened') {
56          jQuery.cookie('side-menu', 'visible', {path: "/"});
57        }else{
58          jQuery.cookie('side-menu', 'hidden', {path: "/"});
59        }
60      }
61
62      if (jQuery.cookie('side-menu') == 'visible') {
63        showMenu(0);
64      } else {
65        hideMenu(0);
66      }
67
68      menuswitcher.click(function(e){
69        if (menubar.is(":hidden")) {
70          showMenu(1);
71        } else {
72          hideMenu(1);
73        }
74        e.preventDefault();
75      });
76    }
77    else if (menubar.length == 1 && p_main_menu=="disabled") {
78      hideMenu(0);
79      menuswitcher.hide();
80    }
81  });
82}());
Note: See TracBrowser for help on using the repository browser.