aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/template/picture.tpl
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2012-03-23 21:58:12 +0000
committerplegall <plg@piwigo.org>2012-03-23 21:58:12 +0000
commitb2d07d4f7234dd4ac966838fc8d5f617b13c157b (patch)
tree8d42e1815609202902290f7ddf0ce05796b3c9c4 /themes/default/template/picture.tpl
parent20133b46141ac32454b6a98dd2b46df9290192d9 (diff)
feature 2598: add sizes XXS and XS
new label for sizes On picture.php, the current size is "checked" and javascript refreshed when switched (with jQuery) jQuery loaded by default on header.tpl (already loaded by thumbnails.tpl) git-svn-id: http://piwigo.org/svn/trunk@13683 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'themes/default/template/picture.tpl')
-rw-r--r--themes/default/template/picture.tpl5
1 files changed, 4 insertions, 1 deletions
diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl
index e0472ca51..b95948b1e 100644
--- a/themes/default/template/picture.tpl
+++ b/themes/default/template/picture.tpl
@@ -29,6 +29,8 @@ function changeImgSrc(url,typeSave,typeMap)
theImg.src = url;
theImg.useMap = "#map"+typeMap;
}
+ jQuery('.derivativeChecked').hide();
+ jQuery('#derivativeChecked'+typeSave).show();
document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
}
@@ -50,8 +52,9 @@ function toggleDerivativeSwitchBox()
{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">&nbsp;</span><span class="pwg-button-text">{'Photo sizes'|@translate}</span></a>
<div id="derivativeSwitchBox" onclick="toggleDerivativeSwitchBox()" style="display:none">
+<div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
{foreach from=$current.unique_derivatives item=derivative key=derivative_type}
-<a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')">{$derivative->get_type()|@translate} ({$derivative->get_size_hr()})</a><br>
+<span class="derivativeChecked" id="derivativeChecked{$derivative->get_type()}" {if $derivative->get_type() ne $current.selected_derivative->get_type()}style="display:none"{/if}>&#x2714;</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>
{/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>