Ignore:
Timestamp:
Mar 23, 2012, 10:58:12 PM (9 years ago)
Author:
plg
Message:

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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/default/template/picture.tpl

    r13489 r13683  
    3030                theImg.useMap = "#map"+typeMap;
    3131        }
     32  jQuery('.derivativeChecked').hide();
     33  jQuery('#derivativeChecked'+typeSave).show();
    3234        document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
    3335}
     
    5153<span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo sizes'|@translate}</span></a>
    5254<div id="derivativeSwitchBox" onclick="toggleDerivativeSwitchBox()" style="display:none">
     55<div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
    5356{foreach from=$current.unique_derivatives item=derivative key=derivative_type}
    54 <a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')">{$derivative->get_type()|@translate} ({$derivative->get_size_hr()})</a><br>
     57<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>
    5558{/foreach}
    5659{if isset($U_ORIGINAL)}
Note: See TracChangeset for help on using the changeset viewer.