- Timestamp:
- Jun 24, 2012, 9:26:25 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/gally/gally-default/template/picture_nav_buttons.tpl
r12632 r16016 2 2 {if $DISPLAY_NAV_BUTTONS or isset($slideshow)} 3 3 4 {if isset($last)} 5 <a id="icon_last" class="navButton" href="{$last.U_IMG}" 6 title="{$last.TITLE}" 7 rel="last"></a> 8 {else} 9 <a id="icon_last_unactive" class="navButton"></a> 10 {/if} 11 12 {if isset($next)} 13 <a id="icon_right" class="navButton" href="{$next.U_IMG}" 14 title="{$next.TITLE}" 4 {strip}{if isset($next)} 5 <a href="{$next.U_IMG}" 6 title="{'Next'|@translate} : {$next.TITLE}" 7 id="icon_right" class="navButton" 15 8 rel="next"></a> 16 9 {else} 17 10 <a id="icon_right_unactive" class="navButton"></a> 18 {/if} 11 {/if}{/strip} 19 12 20 21 <a id="icon_play" class="navButton" href="{$slideshow.U_START_PLAY}" title="{'Play of slideshow'|@translate}"></a>22 {/if} 13 {strip}{if isset($slideshow.U_START_PLAY)} 14 <a href="{$slideshow.U_START_PLAY}" title="{'Play of slideshow'|@translate}" id="icon_play" class="navButton" ></a> 15 {/if}{/strip} 23 16 24 25 <a id="icon_pause" class="navButton" href="{$slideshow.U_STOP_PLAY}" title="{'Pause of slideshow'|@translate}"></a>26 {/if} 17 {strip}{if isset($slideshow.U_STOP_PLAY)} 18 <a href="{$slideshow.U_STOP_PLAY}" title="{'Pause of slideshow'|@translate}" id="icon_pause" class="navButton" ></a> 19 {/if}{/strip} 27 20 28 29 <a id="icon_up" class="navButton" href="{$U_UP}" title="{'Thumbnails'|@translate}" rel="up"></a>30 {/if} 21 {strip}{if isset($U_UP) and !isset($slideshow)} 22 <a href="{$U_UP}" title="{'Thumbnails'|@translate}" rel="up" id="icon_up" class="navButton"></a> 23 {/if}{/strip} 31 24 32 {if isset($previous)} 33 <a id="icon_left" class="navButton" href="{$previous.U_IMG}" 34 title="{$previous.TITLE}" 25 {strip}{if isset($previous)} 26 <a href="{$previous.U_IMG}" 27 title="{'Previous'|@translate} : {$previous.TITLE}" 28 id="icon_left" class="navButton" 35 29 rel="prev"></a> 36 30 {else} 37 31 <a id="icon_left_unactive" class="navButton"></a> 38 {/if} 39 40 {if isset($first)} 41 <a id="icon_first" class="navButton" href="{$first.U_IMG}" 42 title="{$first.TITLE}" 43 rel="first"></a> 44 {else} 45 <a id="icon_first_unactive" class="navButton"></a> 46 {/if} 47 32 {/if}{/strip} 48 33 49 34 {if isset($slideshow.U_START_REPEAT)} 50 <a id="icon_start_repeat" class="navButton" href="{$slideshow.U_START_REPEAT}" title="{'Repeat the slideshow'|@translate}"></a>35 <a href="{$slideshow.U_START_REPEAT}" title="{'Repeat the slideshow'|@translate}" id="icon_start_repeat" class="navButton" ></a> 51 36 {/if} 52 37 53 38 {if isset($slideshow.U_STOP_REPEAT)} 54 <a id="icon_stop_repeat" class="navButton" href="{$slideshow.U_STOP_REPEAT}" title="{'Not repeat the slideshow'|@translate}"></a>39 <a href="{$slideshow.U_STOP_REPEAT}" title="{'Not repeat the slideshow'|@translate}" id="icon_stop_repeat" class="navButton" ></a> 55 40 {/if} 56 41 57 42 {if isset($slideshow)} 58 43 {if isset($slideshow.U_DEC_PERIOD)} 59 <a id="icon_dec_period" class="navButton" href="{$slideshow.U_DEC_PERIOD}" title="{'Accelerate diaporama speed'|@translate}"></a>44 <a href="{$slideshow.U_DEC_PERIOD}" title="{'Accelerate diaporama speed'|@translate}" id="icon_dec_period" class="navButton"></a> 60 45 {else} 61 46 <a id="icon_dec_period_unactive" class="navButton" ></a> … … 63 48 64 49 {if isset($slideshow.U_INC_PERIOD)} 65 <a id="icon_inc_period" class="navButton" href="{$slideshow.U_INC_PERIOD}" title="{'Reduce diaporama speed'|@translate}"></a>50 <a href="{$slideshow.U_INC_PERIOD}" title="{'Reduce diaporama speed'|@translate}" id="icon_inc_period" class="navButton" ></a> 66 51 {else} 67 52 <a id="icon_inc_period_unactive" class="navButton"></a> … … 70 55 {/if} 71 56 </div> 72 73 <script type="text/javascript">// <![CDATA[ 74 {literal} 75 function keyboardNavigation(e) 76 { 77 if(!e) e=window.event; 57 {strip} 58 {footer_script} 59 document.onkeydown = function(e){ldelim} 60 e=e||window.event; 78 61 if (e.altKey) return true; 79 var target = e.target || e.srcElement; 80 if (target && target.type) return true; //an input editable element 81 var keyCode=e.keyCode || e.which; 82 var docElem = document.documentElement; 83 switch(keyCode) { 84 {/literal} 62 var target=e.target||e.srcElement; 63 if (target && target.type) return true;{* an input editable element *} 64 var keyCode=e.keyCode||e.which, docElem=document.documentElement, url; 65 switch(keyCode){ldelim} 85 66 {if isset($next)} 86 case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){ldelim}window.location="{$next.U_IMG}".replace( "&", "&" ); return false; }break;67 case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth)url="{$next.U_IMG}"; break; 87 68 {/if} 88 69 {if isset($previous)} 89 case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ldelim}window.location="{$previous.U_IMG|@escape:jasvascript}".replace("&","&"); return false; }break;70 case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0)url="{$previous.U_IMG}"; break; 90 71 {/if} 91 72 {if isset($first)} 92 /*Home*/case 36: if (e.ctrlKey){ldelim}window.location="{$first.U_IMG|@escape:jasvascript}".replace("&","&"); return false; }break;73 {* Home *}case 36: if (e.ctrlKey)url="{$first.U_IMG}"; break; 93 74 {/if} 94 75 {if isset($last)} 95 /*End*/case 35: if (e.ctrlKey){ldelim}window.location="{$last.U_IMG|@escape:jasvascript}".replace("&","&"); return false; }break;76 {* End *}case 35: if (e.ctrlKey)url="{$last.U_IMG}"; break; 96 77 {/if} 97 78 {if isset($U_UP) and !isset($slideshow)} 98 /*Up*/case 38: if (e.ctrlKey){ldelim}window.location="{$U_UP|@escape:jasvascript}".replace("&","&"); return false; }break;79 {* Up *}case 38: if (e.ctrlKey)url="{$U_UP}"; break; 99 80 {/if} 100 101 81 {if isset($slideshow.U_START_PLAY)} 102 /*Pause*/case 32: {ldelim}window.location="{$slideshow.U_START_PLAY|@escape:jasvascript}".replace("&","&"); return false; }break;82 {* Pause *}case 32: url="{$slideshow.U_START_PLAY}"; break; 103 83 {/if} 104 84 {if isset($slideshow.U_STOP_PLAY)} 105 /*Play*/case 32: {ldelim}window.location="{$slideshow.U_STOP_PLAY|@escape:jasvascript}".replace("&","&"); return false; }break;85 {* Play *}case 32: url="{$slideshow.U_STOP_PLAY}"; break; 106 86 {/if} 107 87 } 88 if (url) {ldelim}window.location=url.replace("&","&"); return false;} 108 89 return true; 109 90 } 110 document.onkeydown=keyboardNavigation; 111 // ]]></script> 91 {/footer_script} 92 {/strip}
Note: See TracChangeset
for help on using the changeset viewer.