diff options
author | Zaphod <zaphod@piwigo.org> | 2012-03-25 19:20:13 +0000 |
---|---|---|
committer | Zaphod <zaphod@piwigo.org> | 2012-03-25 19:20:13 +0000 |
commit | b1041fb217940f8e34a85cea63c27814f6df0dde (patch) | |
tree | c36b7930b29a5ac42b3037b985b2d79e4a3e4ebf /themes/default/template/picture.tpl | |
parent | 3d04cddf5ee20e4fc116acd90ae1b2afad77a98d (diff) |
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
Diffstat (limited to '')
-rw-r--r-- | themes/default/template/picture.tpl | 16 |
1 files changed, 12 insertions, 4 deletions
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}<a id="derivativeSwitchLink" href="javascript:toggleDerivativeSwitchBox()" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> <span class="pwg-icon pwg-icon-sizes"> </span><span class="pwg-button-text">{'Photo sizes'|@translate}</span></a> -<div id="derivativeSwitchBox" onclick="toggleDerivativeSwitchBox()" style="display:none"> +<div id="derivativeSwitchBox" class="switchBox" onclick="toggleDerivativeSwitchBox()" style="display:none" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||toggleDerivativeSwitchBox()"> <div class="switchBoxTitle">{'Photo sizes'|@translate}</div> {foreach from=$current.unique_derivatives item=derivative key=derivative_type} -<span class="derivativeChecked" id="derivativeChecked{$derivative->get_type()}" {if $derivative->get_type() ne $current.selected_derivative->get_type()}style="display:none"{/if}>✔</span> <a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')">{$derivative->get_type()|@translate}<span class="derivativeSizeDetails"> ({$derivative->get_size_hr()})</span></a><br> +<span class="derivativeChecked switchCheck" + id="derivativeChecked{$derivative_type}" {if $derivative->get_type() ne $current.selected_derivative->get_type()}style="display:none"{/if}>✔ </span> +<a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')" + id="derivativeName{$derivative_type}" + class="{if $derivative->get_type() == $current.selected_derivative->get_type()}switchSelected{else}switchUnselected{/if}"> + {$derivative->get_type()|@translate}<span class="derivativeSizeDetails"> ({$derivative->get_size_hr()})</span> +</a><br> {/foreach} {if isset($U_ORIGINAL)} <a href="javascript:phpWGOpenWindow('{$U_ORIGINAL}','xxx','scrollbars=yes,toolbar=no,status=no,resizable=yes')" rel="nofollow">{'Original'|@translate}</a> |