source: extensions/Simple_Grey/picture_nav_buttons.tpl @ 4710

Last change on this file since 4710 was 4710, checked in by boulde, 14 years ago

remove unused code, add image size limit in themeconf and other suggestions
from EX-FTB, make the theme useable without javascript (show menu & comments),
...

File size: 3.0 KB
Line 
1<div class="navButtons">
2{if isset($U_SLIDESHOW_STOP)}
3  <a href="{$U_SLIDESHOW_STOP}" title="{'slideshow_stop'|@translate}">{'Stop'|@translate}</a>
4{/if}
5{if isset($slideshow.U_START_PLAY)}
6  <a href="{$slideshow.U_START_PLAY}" title="{'start_play'|@translate}">Play</a>
7{/if}
8{if isset($slideshow)}
9  {if isset($slideshow.U_STOP_PLAY)}
10    <a href="{$slideshow.U_STOP_PLAY}" title="{'stop_play'|@translate}">Pause</a>
11  {/if}
12  {if isset($slideshow.U_DEC_PERIOD)}
13    <a href="{$slideshow.U_DEC_PERIOD}" title="{'dec_period'|@translate}">&nbsp;+&nbsp;</a>
14  {/if}
15  {if isset($slideshow.U_INC_PERIOD)}
16    <a href="{$slideshow.U_INC_PERIOD}" title="{'inc_period'|@translate}">&nbsp;-&nbsp;</a>
17  {/if}
18{/if}
19{if isset($first)}
20  <a href="{$first.U_IMG}" title="{'first_page'|@translate} : {$first.TITLE}" rel="first">&laquo;</a>
21{/if}
22{if isset($previous)}
23  <a href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev">&lsaquo;</a>
24{/if}
25{if isset($next)}
26  <a href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next">&rsaquo;</a>
27{/if}
28{if isset($last)}
29  <a href="{$last.U_IMG}" title="{'last_page'|@translate} : {$last.TITLE}" rel="last">&raquo;</a>
30{/if}
31</div>
32
33<script type="text/javascript">// <![CDATA[
34{literal}
35function keyboardNavigation(e)
36{
37        if(!e) e=window.event;
38        if (e.altKey) return true;
39        var target = e.target || e.srcElement;
40        if (target && target.type) return true; //an input editable element
41        var keyCode=e.keyCode || e.which;
42        var docElem = document.documentElement;
43        switch(keyCode) {
44{/literal}
45{if isset($next)}
46        case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){ldelim}window.location="{$next.U_IMG}".replace( "&amp;", "&" ); return false; } break;
47{/if}
48{if isset($previous)}
49        case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ldelim}window.location="{$previous.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
50{/if}
51{if isset($first)}
52        /*Home*/case 36: if (e.ctrlKey){ldelim}window.location="{$first.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
53{/if}
54{if isset($last)}
55        /*End*/case 35: if (e.ctrlKey){ldelim}window.location="{$last.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
56{/if}
57{if isset($U_UP) and !isset($slideshow)}
58        /*Up*/case 38: if (e.ctrlKey){ldelim}window.location="{$U_UP|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
59{/if}
60
61{if isset($slideshow.U_START_PLAY)}
62        /*Pause*/case 32: {ldelim}window.location="{$slideshow.U_START_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
63{/if}
64{if isset($slideshow.U_STOP_PLAY)}
65        /*Play*/case 32: {ldelim}window.location="{$slideshow.U_STOP_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
66{/if}
67        }
68        return true;
69}
70document.onkeydown=keyboardNavigation;
71// ]]></script>
Note: See TracBrowser for help on using the repository browser.