Ignore:
Timestamp:
Jun 16, 2013, 4:22:35 PM (11 years ago)
Author:
flop25
Message:

feature:2924
adding 3 options for the default behaviour of the panels
ToDo lang files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/elegant/scripts_pp.js

    r23233 r23251  
    7878        var menubar=jQuery("#menubar");
    7979
    80         if (menubar.length == 1) {
     80        if (menubar.length == 1 && p_main_menu!="disabled") {
    8181
    8282                jQuery("#menuSwitcher").html("<div class=\"switchArrow\">&nbsp;</div>");
    8383
    8484                // if cookie says the menu is hiding, keep it hidden!
    85                 if (sidemenu == 'visible') {
     85                if (sidemenu == 'hidden') {
     86                        hideMenu(0);
     87                } else if (sidemenu == 'visible') {
    8688                        showMenu(0);
    87                 } else {
     89                } else if (p_main_menu == 'off') {
    8890                        hideMenu(0);
     91                }       else {
     92                        showMenu(0);
    8993                }
    9094       
     
    106110        var imageInfos=jQuery("#imageInfos");
    107111
    108         if (imageInfos.length == 1) {
     112        if (imageInfos.length == 1 && p_pict_descr!="disabled") {
    109113
    110114                jQuery("#infoSwitcher").html("<div class=\"switchArrow\">&nbsp;</div>");
     
    113117                if (sideinfo == 'hidden') {
    114118                        hideInfo(0);
     119                } else if (sideinfo == 'visible') {
     120                        showInfo(0);
     121                } else if (p_pict_descr == 'off') {
     122                        hideInfo(0);
    115123                } else {
    116124                        showInfo(0);
     
    136144        commentsswicther.html("<div class=\"switchArrow\">&nbsp;</div>");
    137145       
    138         if (comments.length == 1) {
     146        if (comments.length == 1 && p_pict_comment!="disabled") {
    139147                var comments_button=jQuery("#comments h3");
    140148
     
    144152                }
    145153       
    146                 if (jQuery.cookie('comments') == 'visible') {
     154                if (jQuery.cookie('comments') == 'hidden') {
     155                        comments.addClass("commentshidden");
     156                        comments_button.addClass("comments_toggle").addClass("comments_toggle_on");
     157                } else if (jQuery.cookie('comments') == 'visible') {
    147158                        comments.addClass("commentsshown");
    148159                        comments_button.addClass("comments_toggle").addClass("comments_toggle_off");
    149                 } else {
     160                } else if (p_pict_comment == 'off') {
    150161                        comments.addClass("commentshidden");
    151162                        comments_button.addClass("comments_toggle").addClass("comments_toggle_on");
     163                } else {
     164                        comments.addClass("commentsshown");
     165                        comments_button.addClass("comments_toggle").addClass("comments_toggle_off");
    152166                }
    153167               
Note: See TracChangeset for help on using the changeset viewer.