From b1041fb217940f8e34a85cea63c27814f6df0dde Mon Sep 17 00:00:00 2001 From: Zaphod Date: Sun, 25 Mar 2012 19:20:13 +0000 Subject: feature 2588: template modification for v2.4 -> new class .switchBox for all boxes (sortOrder, derivative, etc...) -> new classes to help layout in switchBoxes: - .switchCheck for the check character - .switchSelected for the selected option - .switchUnselected for all other options -> new menubar.tpl with empty div #menuSwitcher git-svn-id: http://piwigo.org/svn/trunk@13729 68402e56-0260-453c-a942-63ccdbb3a9ee --- themes/Sylvia/theme.css | 2 +- themes/clear/theme.css | 4 ++-- themes/dark/theme.css | 4 ++-- themes/default/template/index.tpl | 12 ++++++------ themes/default/template/menubar.tpl | 2 +- themes/default/template/picture.tpl | 16 ++++++++++++---- themes/default/template/picture_nav_buttons.tpl | 8 ++++---- themes/default/theme.css | 2 +- 8 files changed, 29 insertions(+), 21 deletions(-) diff --git a/themes/Sylvia/theme.css b/themes/Sylvia/theme.css index 5ae238727..e4e892a62 100644 --- a/themes/Sylvia/theme.css +++ b/themes/Sylvia/theme.css @@ -476,7 +476,7 @@ A:hover .pwg-icon { background-color:#666; } -#derivativeSwitchBox, #sortOrderBox { +.switchBox { background-color: #222222; border: 1px solid #FF3363; border-radius: 0 15px 0 15px; diff --git a/themes/clear/theme.css b/themes/clear/theme.css index 9cc53a6f9..a75131f2d 100644 --- a/themes/clear/theme.css +++ b/themes/clear/theme.css @@ -14,12 +14,12 @@ H2, #menubar DT, #imageHeaderBar, #imageToolBar A:hover { background-color: #d3d3d3; } -#menubar DL, .content, #imageToolBar, #derivativeSwitchBox, #sortOrderBox, .header_notes { +#menubar DL, .content, #imageToolBar, .switchBox, .header_notes { background-color: #eeeeee; } /* borders */ -#menubar DL, .content, #imageToolBar, #derivativeSwitchBox, #sortOrderBox { +#menubar DL, .content, #imageToolBar, .switchBox { border: 1px solid #d3d3d3; } diff --git a/themes/dark/theme.css b/themes/dark/theme.css index 34921c92d..aba4fb2a1 100644 --- a/themes/dark/theme.css +++ b/themes/dark/theme.css @@ -17,7 +17,7 @@ BODY, H3, #imageToolBar A:hover { background-color: #2f2f2f; } -#menubar DL, .content, #imageToolBar, #imageHeaderBar, #derivativeSwitchBox, #sortOrderBox, .header_notes { +#menubar DL, .content, #imageToolBar, #imageHeaderBar, .switchBox, .header_notes { background-color: #505050; } @@ -30,7 +30,7 @@ BODY, H3, #imageToolBar A:hover { } /* borders */ -#menubar DL, .content, #derivativeSwitchBox, #sortOrderBox{ +#menubar DL, .content, .switchBox { border: 1px solid #000; } diff --git a/themes/default/template/index.tpl b/themes/default/template/index.tpl index 35697d778..c1f9d42a9 100644 --- a/themes/default/template/index.tpl +++ b/themes/default/template/index.tpl @@ -7,13 +7,13 @@
  • {strip}  {'Sort order'|@translate} -
  • {strip}  {'Photo sizes'|@translate} - + {/if} \ No newline at end of file diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl index b95948b1e..da8309baa 100644 --- a/themes/default/template/picture.tpl +++ b/themes/default/template/picture.tpl @@ -31,7 +31,9 @@ function changeImgSrc(url,typeSave,typeMap) } jQuery('.derivativeChecked').hide(); jQuery('#derivativeChecked'+typeSave).show(); - document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}'; + jQuery('#derivativeSiwtchBox .switchSelected').addClass('switchUnselected').removeClass('switchSelected'); + jQuery('#derivativeName'+typeSave).addClass('switchSelected').removeClass('switchUnselected'); + document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}'; } function toggleDerivativeSwitchBox() @@ -41,7 +43,7 @@ function toggleDerivativeSwitchBox() if (elt.style.display==="none") { elt.style.position = "absolute"; - elt.style.left = (ePos.offsetLeft+10)+"px"; + elt.style.left = (ePos.offsetLeft)+"px"; elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px"; elt.style.display=""; } @@ -51,10 +53,16 @@ function toggleDerivativeSwitchBox() {/literal}{/footer_script} {strip}  {'Photo sizes'|@translate} -