feature 2548 multisize - ability to choose displayed size on index page
-added some logs on i.php (configurable) to measure the perf git-svn-id: http://piwigo.org/svn/trunk@12908 68402e56-0260-453c-a942-63ccdbb3a9ee
@@ -37,6 +37,7 @@
|
||||
.pwg-icon-close {background-position: 0 -52px}
|
||||
.pwg-icon-category-edit {background-position: -26px -52px}
|
||||
.pwg-icon-sort {background-position: -52px -52px}
|
||||
.pwg-icon-sizes {background-position: -78px -52px}
|
||||
.pwg-icon-category-view-normal {background-position: -156px -52px}
|
||||
.pwg-icon-category-view-flat {background-position: -182px -52px}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -35,6 +35,39 @@ function toggleSortOrderBox()
|
||||
{/literal}{/footer_script}
|
||||
{/strip}</li>
|
||||
{/if}
|
||||
|
||||
{if !empty($image_derivatives)}
|
||||
<li>{strip}<a href="javascript:toggleImageDerivativesBox()" id="derivativeChooseLink" 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" style="display:none; text-align:left" onclick="toggleImageDerivativesBox()">
|
||||
{foreach from=$image_derivatives item=image_derivative name=deriv_loop}{if !$smarty.foreach.deriv_loop.first}<br>{/if}
|
||||
{if $image_derivative.SELECTED}
|
||||
<span>{$image_derivative.DISPLAY}</span>
|
||||
{else}
|
||||
<a href="{$image_derivative.URL}" rel="nofollow">{$image_derivative.DISPLAY}</a>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{footer_script}{literal}
|
||||
function toggleImageDerivativesBox()
|
||||
{
|
||||
var elt = document.getElementById("derivativeSwitchBox"),
|
||||
ePos = document.getElementById("derivativeChooseLink");
|
||||
if (elt.style.display==="none")
|
||||
{
|
||||
elt.style.position = "absolute";
|
||||
elt.style.left = (ePos.offsetLeft) + "px";
|
||||
elt.style.top = (ePos.offsetTop + ePos.offsetHeight) + "px";
|
||||
elt.style.display="";
|
||||
}
|
||||
else
|
||||
elt.style.display="none";
|
||||
}
|
||||
{/literal}{/footer_script}
|
||||
{/strip}</li>
|
||||
{/if}
|
||||
|
||||
{if isset($favorite)}
|
||||
<li><a href="{$favorite.U_FAVORITE}" title="{'delete all photos from your favorites'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
|
||||
<span class="pwg-icon pwg-icon-favorite-del"> </span><span class="pwg-button-text">{'delete all photos from your favorites'|@translate}</span>
|
||||
|
||||
@@ -1,10 +1,25 @@
|
||||
{if !empty($thumbnails)}
|
||||
{strip}{foreach from=$thumbnails item=thumbnail}
|
||||
{if !empty($thumbnails)}{strip}
|
||||
{html_head}
|
||||
<style type="text/css">
|
||||
{*Set some sizes according to maximum thumbnail width and height*}
|
||||
.thumbnails SPAN,
|
||||
.thumbnails .wrap2 A,
|
||||
.thumbnails LABEL{ldelim}
|
||||
width: {$derivative_params->max_width()}px;
|
||||
}
|
||||
|
||||
.thumbnails .wrap2{ldelim}
|
||||
height: {$derivative_params->max_height()+2}px;
|
||||
}
|
||||
|
||||
</style>
|
||||
{/html_head}
|
||||
{foreach from=$thumbnails item=thumbnail}
|
||||
<li>
|
||||
<span class="wrap1">
|
||||
<span class="wrap2">
|
||||
<a href="{$thumbnail.URL}">
|
||||
<img class="thumbnail" src="{$thumbnail.TN_SRC}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
|
||||
<img class="thumbnail" src="{$pwg->derivative_url($derivative_params, $thumbnail.src_image)}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
|
||||
</a>
|
||||
</span>
|
||||
{if $SHOW_THUMBNAIL_CAPTION }
|
||||
|
||||
@@ -685,13 +685,10 @@ IMG.ui-datepicker-trigger {
|
||||
}
|
||||
|
||||
/* Set some sizes according to your maximum thumbnail width and height */
|
||||
.thumbnails SPAN,
|
||||
.thumbnails .wrap2 A,
|
||||
.thumbnails LABEL,
|
||||
.thumbnailCategory DIV.illustration {
|
||||
width: 140px; /* max thumbnail width + 2px */
|
||||
}
|
||||
.thumbnails .wrap2,
|
||||
|
||||
.content .thumbnailCategory .description {
|
||||
height: 140px; /* max thumbnail height + 2px */
|
||||
}
|
||||
|
||||