[13549] | 1 | {if $DISPLAY_NAV_BUTTONS} |
---|
[13546] | 2 | <div class="navButtons"> |
---|
| 3 | {if isset($U_SLIDESHOW_STOP)} |
---|
| 4 | <a href="{$U_SLIDESHOW_STOP}" title="{'stop the slideshow'|@translate}">{'Stop'|@translate}</a> |
---|
| 5 | {/if} |
---|
| 6 | {if isset($slideshow.U_START_PLAY)} |
---|
| 7 | <a href="{$slideshow.U_START_PLAY}" title="{'Play of slideshow'|@translate}">Play</a> |
---|
| 8 | {/if} |
---|
| 9 | {if isset($slideshow)} |
---|
| 10 | {if isset($slideshow.U_STOP_PLAY)} |
---|
| 11 | <a href="{$slideshow.U_STOP_PLAY}" title="{'Pause of slideshow'|@translate}">Pause</a> |
---|
| 12 | {/if} |
---|
| 13 | {if isset($slideshow.U_DEC_PERIOD)} |
---|
| 14 | <a href="{$slideshow.U_DEC_PERIOD}" title="{'Accelerate diaporama speed'|@translate}"> + </a> |
---|
| 15 | {/if} |
---|
| 16 | {if isset($slideshow.U_INC_PERIOD)} |
---|
| 17 | <a href="{$slideshow.U_INC_PERIOD}" title="{'Reduce diaporama speed'|@translate}"> - </a> |
---|
| 18 | {/if} |
---|
| 19 | {/if} |
---|
| 20 | {if isset($first)} |
---|
| 21 | <a href="{$first.U_IMG}" title="{'First'|@translate} : {$first.TITLE}" rel="first">«</a> |
---|
| 22 | {/if} |
---|
| 23 | {if isset($previous)} |
---|
| 24 | <a href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev">‹</a> |
---|
| 25 | {/if} |
---|
| 26 | {if isset($next)} |
---|
| 27 | <a href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next">›</a> |
---|
| 28 | {/if} |
---|
| 29 | {if isset($last)} |
---|
| 30 | <a href="{$last.U_IMG}" title="{'Last'|@translate} : {$last.TITLE}" rel="last">»</a> |
---|
| 31 | {/if} |
---|
| 32 | </div> |
---|
[13549] | 33 | {/if} |
---|
[13546] | 34 | |
---|
| 35 | <script type="text/javascript">// <![CDATA[ |
---|
| 36 | {literal} |
---|
| 37 | function keyboardNavigation(e) |
---|
| 38 | { |
---|
| 39 | if(!e) e=window.event; |
---|
| 40 | if (e.altKey) return true; |
---|
| 41 | var target = e.target || e.srcElement; |
---|
| 42 | if (target && target.type) return true; //an input editable element |
---|
| 43 | var keyCode=e.keyCode || e.which; |
---|
| 44 | var docElem = document.documentElement; |
---|
| 45 | switch(keyCode) { |
---|
| 46 | {/literal} |
---|
| 47 | {if isset($next)} |
---|
| 48 | case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){ldelim}window.location="{$next.U_IMG}".replace( "&", "&" ); return false; } break; |
---|
| 49 | {/if} |
---|
| 50 | {if isset($previous)} |
---|
| 51 | case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ldelim}window.location="{$previous.U_IMG|@escape:jasvascript}".replace("&","&"); return false; } break; |
---|
| 52 | {/if} |
---|
| 53 | {if isset($first)} |
---|
| 54 | /*Home*/case 36: if (e.ctrlKey){ldelim}window.location="{$first.U_IMG|@escape:jasvascript}".replace("&","&"); return false; } break; |
---|
| 55 | {/if} |
---|
| 56 | {if isset($last)} |
---|
| 57 | /*End*/case 35: if (e.ctrlKey){ldelim}window.location="{$last.U_IMG|@escape:jasvascript}".replace("&","&"); return false; } break; |
---|
| 58 | {/if} |
---|
| 59 | {if isset($U_UP) and !isset($slideshow)} |
---|
| 60 | /*Up*/case 38: if (e.ctrlKey){ldelim}window.location="{$U_UP|@escape:jasvascript}".replace("&","&"); return false; } break; |
---|
| 61 | {/if} |
---|
| 62 | |
---|
| 63 | {if isset($slideshow.U_START_PLAY)} |
---|
| 64 | /*Pause*/case 32: {ldelim}window.location="{$slideshow.U_START_PLAY|@escape:jasvascript}".replace("&","&"); return false; } break; |
---|
| 65 | {/if} |
---|
| 66 | {if isset($slideshow.U_STOP_PLAY)} |
---|
| 67 | /*Play*/case 32: {ldelim}window.location="{$slideshow.U_STOP_PLAY|@escape:jasvascript}".replace("&","&"); return false; } break; |
---|
| 68 | {/if} |
---|
| 69 | } |
---|
| 70 | return true; |
---|
| 71 | } |
---|
| 72 | document.onkeydown=keyboardNavigation; |
---|
| 73 | // ]]></script> |
---|