Ignore:
Timestamp:
Mar 25, 2012, 9:20:13 PM (9 years ago)
Author:
Zaphod
Message:

feature 2588: template modification for v2.4

-> new class .switchBox for all boxes (sortOrder, derivative, etc...)
-> new classes to help layout in switchBoxes:

  • .switchCheck for the check character
  • .switchSelected for the selected option
  • .switchUnselected for all other options

-> new menubar.tpl with empty div #menuSwitcher

File:
1 edited

Legend:

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

    r13683 r13729  
    3232  jQuery('.derivativeChecked').hide();
    3333  jQuery('#derivativeChecked'+typeSave).show();
    34         document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
     34  jQuery('#derivativeSiwtchBox .switchSelected').addClass('switchUnselected').removeClass('switchSelected');
     35  jQuery('#derivativeName'+typeSave).addClass('switchSelected').removeClass('switchUnselected');
     36    document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
    3537}
    3638
     
    4244        {
    4345                elt.style.position = "absolute";
    44                 elt.style.left = (ePos.offsetLeft+10)+"px";
     46                elt.style.left = (ePos.offsetLeft)+"px";
    4547                elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
    4648                elt.style.display="";
     
    5254{strip}<a id="derivativeSwitchLink" href="javascript:toggleDerivativeSwitchBox()" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
    5355<span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo sizes'|@translate}</span></a>
    54 <div id="derivativeSwitchBox" onclick="toggleDerivativeSwitchBox()" style="display:none">
     56<div id="derivativeSwitchBox" class="switchBox" onclick="toggleDerivativeSwitchBox()" style="display:none" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||toggleDerivativeSwitchBox()">
    5557<div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
    5658{foreach from=$current.unique_derivatives item=derivative key=derivative_type}
    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>
     59<span class="derivativeChecked switchCheck"
     60 id="derivativeChecked{$derivative_type}" {if $derivative->get_type() ne $current.selected_derivative->get_type()}style="display:none"{/if}>&#x2714; </span>
     61<a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')"
     62 id="derivativeName{$derivative_type}"
     63 class="{if $derivative->get_type() == $current.selected_derivative->get_type()}switchSelected{else}switchUnselected{/if}">
     64        {$derivative->get_type()|@translate}<span class="derivativeSizeDetails"> ({$derivative->get_size_hr()})</span>
     65</a><br>
    5866{/foreach}
    5967{if isset($U_ORIGINAL)}
Note: See TracChangeset for help on using the changeset viewer.