Changeset 12908 for trunk/themes


Ignore:
Timestamp:
Jan 17, 2012, 7:09:32 AM (12 years ago)
Author:
rvelices
Message:

feature 2548 multisize - ability to choose displayed size on index page
-added some logs on i.php (configurable) to measure the perf

Location:
trunk/themes/default
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/default/iconset.css

    r12873 r12908  
    3838.pwg-icon-category-edit {background-position: -26px -52px}
    3939.pwg-icon-sort {background-position: -52px -52px}
     40.pwg-icon-sizes {background-position: -78px -52px}
    4041.pwg-icon-category-view-normal {background-position: -156px -52px}
    4142.pwg-icon-category-view-flat {background-position: -182px -52px}
  • trunk/themes/default/template/index.tpl

    r12878 r12908  
    3636                {/strip}</li>
    3737{/if}
     38
     39{if !empty($image_derivatives)}
     40                <li>{strip}<a href="javascript:toggleImageDerivativesBox()" id="derivativeChooseLink" title="{'Photo Sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
     41                        <span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo Sizes'|@translate}</span>
     42                </a>
     43                <div id="derivativeSwitchBox" style="display:none; text-align:left" onclick="toggleImageDerivativesBox()">
     44                        {foreach from=$image_derivatives item=image_derivative name=deriv_loop}{if !$smarty.foreach.deriv_loop.first}<br>{/if}
     45                        {if $image_derivative.SELECTED}
     46                        <span>{$image_derivative.DISPLAY}</span>
     47                        {else}
     48                        <a href="{$image_derivative.URL}" rel="nofollow">{$image_derivative.DISPLAY}</a>
     49                        {/if}
     50                        {/foreach}
     51                </div>
     52                {footer_script}{literal}
     53function toggleImageDerivativesBox()
     54{
     55        var elt = document.getElementById("derivativeSwitchBox"),
     56                ePos = document.getElementById("derivativeChooseLink");
     57        if (elt.style.display==="none")
     58        {
     59                elt.style.position = "absolute";
     60                elt.style.left = (ePos.offsetLeft) + "px";
     61                elt.style.top = (ePos.offsetTop + ePos.offsetHeight) + "px";
     62                elt.style.display="";
     63        }
     64        else
     65                elt.style.display="none";
     66}
     67                {/literal}{/footer_script}
     68                {/strip}</li>
     69{/if}
     70
    3871{if isset($favorite)}
    3972                <li><a href="{$favorite.U_FAVORITE}" title="{'delete all photos from your favorites'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
  • trunk/themes/default/template/thumbnails.tpl

    r11990 r12908  
    1 {if !empty($thumbnails)}
    2 {strip}{foreach from=$thumbnails item=thumbnail}
     1{if !empty($thumbnails)}{strip}
     2{html_head}
     3<style type="text/css">
     4{*Set some sizes according to maximum thumbnail width and height*}
     5.thumbnails SPAN,
     6.thumbnails .wrap2 A,
     7.thumbnails LABEL{ldelim}
     8        width: {$derivative_params->max_width()}px;
     9}
     10
     11.thumbnails .wrap2{ldelim}
     12        height: {$derivative_params->max_height()+2}px;
     13}
     14
     15</style>
     16{/html_head}
     17{foreach from=$thumbnails item=thumbnail}
    318        <li>
    419        <span class="wrap1">
    520                <span class="wrap2">
    621                <a href="{$thumbnail.URL}">
    7                         <img class="thumbnail" src="{$thumbnail.TN_SRC}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
     22                        <img class="thumbnail" src="{$pwg->derivative_url($derivative_params, $thumbnail.src_image)}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
    823                </a>
    924                </span>
  • trunk/themes/default/theme.css

    r12881 r12908  
    686686
    687687/* Set some sizes according to your maximum thumbnail width and height */
    688 .thumbnails SPAN,
    689 .thumbnails .wrap2 A,
    690 .thumbnails LABEL,
    691688.thumbnailCategory DIV.illustration {
    692689  width: 140px;      /* max thumbnail width + 2px */
    693690}
    694 .thumbnails .wrap2,
     691
    695692.content .thumbnailCategory .description {
    696693  height: 140px;    /* max thumbnail height + 2px */
Note: See TracChangeset for help on using the changeset viewer.