aboutsummaryrefslogtreecommitdiffstats
path: root/themes/elegant/scripts_pp.js
diff options
context:
space:
mode:
authorflop25 <flop25@piwigo.org>2013-06-16 14:22:35 +0000
committerflop25 <flop25@piwigo.org>2013-06-16 14:22:35 +0000
commitb4cac600761d9f54a2af389dc394be061fad292c (patch)
tree5b6c1d71e80588dc82c03aa6393c84f9f11e9bc3 /themes/elegant/scripts_pp.js
parentc86481cbbef6d221d0bcd1d69e9434fd19dc2b22 (diff)
feature:2924
adding 3 options for the default behaviour of the panels ToDo lang files git-svn-id: http://piwigo.org/svn/trunk@23251 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'themes/elegant/scripts_pp.js')
-rw-r--r--themes/elegant/scripts_pp.js28
1 files changed, 21 insertions, 7 deletions
diff --git a/themes/elegant/scripts_pp.js b/themes/elegant/scripts_pp.js
index 79d700ebb..bf7e1531d 100644
--- a/themes/elegant/scripts_pp.js
+++ b/themes/elegant/scripts_pp.js
@@ -77,15 +77,19 @@ jQuery("document").ready(function(jQuery){
var sidemenu = jQuery.cookie('picture-menu');
var menubar=jQuery("#menubar");
- if (menubar.length == 1) {
+ if (menubar.length == 1 && p_main_menu!="disabled") {
jQuery("#menuSwitcher").html("<div class=\"switchArrow\">&nbsp;</div>");
// if cookie says the menu is hiding, keep it hidden!
- if (sidemenu == 'visible') {
+ if (sidemenu == 'hidden') {
+ hideMenu(0);
+ } else if (sidemenu == 'visible') {
showMenu(0);
- } else {
+ } else if (p_main_menu == 'off') {
hideMenu(0);
+ } else {
+ showMenu(0);
}
jQuery("#menuSwitcher").click(function(){
@@ -105,13 +109,17 @@ jQuery("document").ready(function(jQuery){
var sideinfo = jQuery.cookie('side-info');
var imageInfos=jQuery("#imageInfos");
- if (imageInfos.length == 1) {
+ if (imageInfos.length == 1 && p_pict_descr!="disabled") {
jQuery("#infoSwitcher").html("<div class=\"switchArrow\">&nbsp;</div>");
// if cookie says the menu is hiding, keep it hidden!
if (sideinfo == 'hidden') {
hideInfo(0);
+ } else if (sideinfo == 'visible') {
+ showInfo(0);
+ } else if (p_pict_descr == 'off') {
+ hideInfo(0);
} else {
showInfo(0);
}
@@ -135,7 +143,7 @@ jQuery("document").ready(function(jQuery){
commentsswicther.html("<div class=\"switchArrow\">&nbsp;</div>");
- if (comments.length == 1) {
+ if (comments.length == 1 && p_pict_comment!="disabled") {
var comments_button=jQuery("#comments h3");
if (comments_button.length == 0) {
@@ -143,12 +151,18 @@ jQuery("document").ready(function(jQuery){
comments_button=jQuery("#comments h3");
}
- if (jQuery.cookie('comments') == 'visible') {
+ if (jQuery.cookie('comments') == 'hidden') {
+ comments.addClass("commentshidden");
+ comments_button.addClass("comments_toggle").addClass("comments_toggle_on");
+ } else if (jQuery.cookie('comments') == 'visible') {
comments.addClass("commentsshown");
comments_button.addClass("comments_toggle").addClass("comments_toggle_off");
- } else {
+ } else if (p_pict_comment == 'off') {
comments.addClass("commentshidden");
comments_button.addClass("comments_toggle").addClass("comments_toggle_on");
+ } else {
+ comments.addClass("commentsshown");
+ comments_button.addClass("comments_toggle").addClass("comments_toggle_off");
}
comments_button.click(function() { commentsToggle() });