Ignore:
Timestamp:
Jun 22, 2013, 6:44:48 AM (11 years ago)
Author:
rvelices
Message:

feature 2928: fctorize switchBox (now js is loaded async + also apply to the calendar type links on index page)

File:
1 edited

Legend:

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

    r23384 r23437  
    1 {combine_script id='core.switchbox' load='footer' require='jquery' path='themes/default/js/switchbox.js'}
     1{combine_script id='core.switchbox' load='async' require='jquery' path='themes/default/js/switchbox.js'}
    22{if isset($MENUBAR)}{$MENUBAR}{/if}
    33<div id="content"{if isset($MENUBAR)} class="contentWithMenu"{/if}>
     
    2121<div class="actionButtons">
    2222{if isset($current.unique_derivatives) && count($current.unique_derivatives)>1}
    23 {footer_script require='jquery,core.switchbox'}{literal}
     23{footer_script require='jquery'}{literal}
    2424function changeImgSrc(url,typeSave,typeMap)
    2525{
     
    3535        document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
    3636}
    37 switchBox("#derivativeSwitchLink", "#derivativeSwitchBox");
     37(SwitchBox=window.SwitchBox||[]).push("#derivativeSwitchLink", "#derivativeSwitchBox");
    3838{/literal}{/footer_script}
    3939{strip}<a id="derivativeSwitchLink" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
Note: See TracChangeset for help on using the changeset viewer.