source: extensions/stripped/template/picture_nav_buttons.tpl @ 7989

Last change on this file since 7989 was 7989, checked in by Zaphod, 13 years ago

[extension] stripped - first release

File size: 5.1 KB
Line 
1<div class="navButtons">
2{if $DISPLAY_NAV_BUTTONS or isset($slideshow)}
3
4  {if isset($last)}
5    <a id="icon_last" class="navButton" href="{$last.U_IMG}" title="{'Last'|@translate} : {$last.TITLE}" rel="last"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/last.png" class="button" alt="{'Last'|@translate}">--></a>
6  {else}
7    <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/last_0.png" class="button" alt=""></a>
8  {/if}
9
10  {if isset($next)}
11    <a id="icon_right" class="navButton" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/right.png" class="button" alt="{'Next'|@translate}">--></a>
12  {else}
13    <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/right_0.png" class="button" alt=""></a>
14  {/if}
15
16  {if isset($slideshow.U_START_PLAY)}
17    <a id="icon_play" class="navButton" href="{$slideshow.U_START_PLAY}" title="{'Play of slideshow'|@translate}"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/play.png" class="button" alt="{'Play of slideshow'|@translate}"> --></a>
18  {/if}
19
20  {if isset($slideshow.U_STOP_PLAY)}
21    <a id="icon_pause" class="navButton" href="{$slideshow.U_STOP_PLAY}" title="{'Pause of slideshow'|@translate}"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/pause.png" class="button" alt="{'Pause of slideshow'|@translate}"> --></a>
22  {/if}
23
24  {if isset($U_SLIDESHOW_STOP)}
25    <a id="icon_stop" class="navButton" href="{$U_SLIDESHOW_STOP}" title="{'stop the slideshow'|@translate}"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/stop.png" class="button" alt="{'Play of slideshow'|@translate}"> --></a>
26  {/if}
27
28  {if isset($U_UP) and !isset($slideshow)}
29    <a id="icon_up" class="navButton" href="{$U_UP}" title="{'Thumbnails'|@translate}" rel="up"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/up.png" class="button" alt="{'Thumbnails'|@translate}"> --></a>
30  {/if}
31
32  {if isset($previous)}
33    <a id="icon_left" class="navButton" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/left.png" class="button" alt="{'Previous'|@translate}">--></a>
34  {else}
35    <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/left_0.png" class="button" alt=""></a>
36  {/if}
37
38  {if isset($first)}
39    <a id="icon_first" class="navButton" href="{$first.U_IMG}" title="{'First'|@translate} : {$first.TITLE}" rel="first"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/first.png" class="button" alt="{'First'|@translate}">--></a>
40  {else}
41    <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/first_0.png" class="button" alt=""></a>
42  {/if}
43
44
45  {if isset($slideshow.U_START_REPEAT)}
46    <a id="icon_start_repeat" class="navButton" href="{$slideshow.U_START_REPEAT}" title="{'Repeat the slideshow'|@translate}"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/start_repeat.png" class="button" alt="{'Repeat the slideshow'|@translate}">--></a>
47  {/if}
48
49  {if isset($slideshow.U_STOP_REPEAT)}
50    <a id="icon_stop_repeat" class="navButton" href="{$slideshow.U_STOP_REPEAT}" title="{'Not repeat the slideshow'|@translate}"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_repeat.png" class="button" alt="{'Not repeat the slideshow'|@translate}">--></a>
51  {/if}
52
53{/if}
54</div>
55
56
57
58
59<script type="text/javascript">// <![CDATA[
60{literal}
61function keyboardNavigation(e)
62{
63        if(!e) e=window.event;
64        if (e.altKey) return true;
65        var target = e.target || e.srcElement;
66        if (target && target.type) return true; //an input editable element
67        var keyCode=e.keyCode || e.which;
68        var docElem = document.documentElement;
69        switch(keyCode) {
70{/literal}
71{if isset($next)}
72        case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){ldelim}window.location="{$next.U_IMG}".replace( "&amp;", "&" ); return false; } break;
73{/if}
74{if isset($previous)}
75        case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ldelim}window.location="{$previous.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
76{/if}
77{if isset($first)}
78        /*Home*/case 36: if (e.ctrlKey){ldelim}window.location="{$first.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
79{/if}
80{if isset($last)}
81        /*End*/case 35: if (e.ctrlKey){ldelim}window.location="{$last.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
82{/if}
83{if isset($U_UP) and !isset($slideshow)}
84        /*Up*/case 38: if (e.ctrlKey){ldelim}window.location="{$U_UP|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
85{/if}
86
87{if isset($slideshow.U_START_PLAY)}
88        /*Pause*/case 32: {ldelim}window.location="{$slideshow.U_START_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
89{/if}
90{if isset($slideshow.U_STOP_PLAY)}
91        /*Play*/case 32: {ldelim}window.location="{$slideshow.U_STOP_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
92{/if}
93        }
94        return true;
95}
96document.onkeydown=keyboardNavigation;
97// ]]></script>
Note: See TracBrowser for help on using the repository browser.