- on picture.php do not set the prefetch link if already set by a plugin

- picture.tpl set the derivative size checkbox id to the correct name

git-svn-id: http://piwigo.org/svn/trunk@23882 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2013-07-08 23:14:14 +00:00
parent 571ebc12f7
commit c3c807b553
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -944,6 +944,7 @@ $template->assign( 'ELEMENT_CONTENT', $element_content );
if (isset($picture['next'])
and $picture['next']['src_image']->is_original()
and $template->get_template_vars('U_PREFETCH') == null
and strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome/') === false)
{
$template->assign(
+2 -2
View File
@@ -31,7 +31,7 @@ function changeImgSrc(url,typeSave,typeMap)
theImg.useMap = "#map"+typeMap;
}
jQuery('#derivativeSwitchBox .switchCheck').css('visibility','hidden');
jQuery('#derivativeChecked'+typeSave).css('visibility','visible');
jQuery('#derivativeChecked'+typeMap).css('visibility','visible');
document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
}
(SwitchBox=window.SwitchBox||[]).push("#derivativeSwitchLink", "#derivativeSwitchBox");
@@ -42,7 +42,7 @@ function changeImgSrc(url,typeSave,typeMap)
<div id="derivativeSwitchBox" class="switchBox">
<div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
{foreach from=$current.unique_derivatives item=derivative key=derivative_type}
<span class="switchCheck" id="derivativeChecked{$derivative_type}"{if $derivative->get_type() ne $current.selected_derivative->get_type()} style="visibility:hidden"{/if}>&#x2714; </span>
<span class="switchCheck" id="derivativeChecked{$derivative->get_type()}"{if $derivative->get_type() ne $current.selected_derivative->get_type()} style="visibility:hidden"{/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>