- Timestamp:
- Jun 18, 2013, 12:29:55 PM (11 years ago)
- Location:
- trunk/themes/default
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/themes/default/template/index.tpl
r23263 r23320 1 {combine_script id='core.switchbox' load='footer' require='jquery' path='themes/default/js/switchbox.js'} 1 2 {$MENUBAR} 3 2 4 3 5 {if isset($errors) or isset($infos)} … … 25 27 {/foreach} 26 28 </div> 27 {footer_script require='jquery'}{literal} 28 jQuery("#sortOrderLink").click(function() { 29 var elt = jQuery("#sortOrderBox"); 30 elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5)) 31 .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true)) 32 .toggle(); 33 }); 34 jQuery("#sortOrderBox").on("mouseleave", function() { 35 jQuery(this).hide(); 36 }); 37 {/literal}{/footer_script} 29 {footer_script require='core.switchbox'}switchBox("#sortOrderLink", "#sortOrderBox");{/footer_script} 38 30 {/strip}</li> 39 31 {/if} … … 52 44 {/foreach} 53 45 </div> 54 {footer_script require='jquery'}{literal} 55 jQuery("#derivativeSwitchLink").click(function() { 56 var elt = jQuery("#derivativeSwitchBox"); 57 elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5)) 58 .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true)) 59 .toggle(); 60 }); 61 jQuery("#derivativeSwitchBox").on("mouseleave", function() { 62 jQuery(this).hide(); 63 }); 64 {/literal}{/footer_script} 46 {footer_script require='core.switchbox'}switchBox("#derivativeSwitchLink", "#derivativeSwitchBox");{/footer_script} 65 47 {/strip}</li> 66 48 {/if} -
trunk/themes/default/template/picture.tpl
r23263 r23320 1 {* Example of resizeable 2 {include file='include/autosize.inc.tpl'} 3 *} 1 {combine_script id='core.switchbox' load='footer' require='jquery' path='themes/default/js/switchbox.js'} 4 2 {if isset($MENUBAR)}{$MENUBAR}{/if} 5 3 <div id="content"{if isset($MENUBAR)} class="contentWithMenu"{/if}> 4 6 5 {if isset($errors) or not empty($infos)} 7 6 {include file='infos_errors.tpl'} 8 7 {/if} 8 9 9 {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if} 10 10 … … 18 18 <div class="imageNumber">{$PHOTO}</div> 19 19 {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'} 20 20 21 <div class="actionButtons"> 21 22 {if isset($current.unique_derivatives) && count($current.unique_derivatives)>1} 22 {footer_script require='jquery '}{literal}23 {footer_script require='jquery,core.switchbox'}{literal} 23 24 function changeImgSrc(url,typeSave,typeMap) 24 25 { … … 34 35 document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}'; 35 36 } 36 jQuery("#derivativeSwitchLink").click(function() { 37 var elt = jQuery("#derivativeSwitchBox"); 38 elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5)) 39 .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true)) 40 .toggle(); 41 }); 42 jQuery("#derivativeSwitchBox").on("mouseleave click", function() { 43 jQuery(this).hide(); 44 }); 37 switchBox("#derivativeSwitchLink", "#derivativeSwitchBox"); 45 38 {/literal}{/footer_script} 46 39 {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.