source: extensions/luciano/template/picture_nav_buttons.tpl @ 12523

Last change on this file since 12523 was 5921, checked in by patdenice, 14 years ago

[Luciano Amodio Theme] First commit

File size: 4.6 KB
Line 
1{* $Id: picture_nav_buttons.tpl 2700 2008-10-10 13:11:31Z rvelices $ *}
2<div class="navButtons">
3
4        {if isset($first)}
5        <a class="navButton" href="{$first.U_IMG}" title="{'first_page'|@translate} : {$first.TITLE}" rel="first"><img src="{$ROOT_URL}{$themeconf.icon_dir}/first.png" class="button" alt="{'first_page'|@translate}"></a>
6        {else}
7        <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/first_unactive.png" class="button" alt=""></a>
8        {/if}
9       
10        {if isset($previous)}
11        <a class="navButton" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev"><img src="{$ROOT_URL}{$themeconf.icon_dir}/left.png" class="button" alt="{'previous_page'|@translate}"></a>
12        {else}
13        <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/left_unactive.png" class="button" alt=""></a>
14        {/if}
15       
16        {if isset($U_SLIDESHOW_STOP)}
17        <a class="navButton" href="{$U_SLIDESHOW_STOP}" title="{'slideshow_stop'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_selected.png" class="button" alt="{'slideshow_stop'|@translate}"></a>
18        {/if}
19       
20        {if isset($slideshow.U_START_PLAY)}
21        <a class="navButton" href="{$slideshow.U_START_PLAY}" title="{'slideshow_play'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/play.png" class="button" alt="{'slideshow_play'|@translate}"></a>
22        {/if}
23       
24        {if isset($slideshow.U_STOP_PLAY)}
25        <a class="navButton" href="{$slideshow.U_STOP_PLAY}" title="{'stop_play'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/pause.png" class="button" alt="{'stop_play'|@translate}"></a>
26        {/if}
27       
28        {if isset($U_UP) and !isset($slideshow)}
29        <a 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($next)}
33        <a class="navButton" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next"><img src="{$ROOT_URL}{$themeconf.icon_dir}/right.png" class="button" alt="{'next_page'|@translate}"></a>
34        {else}
35        <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/right_unactive.png" class="button" alt=""></a>
36        {/if}
37       
38        {if isset($last)}
39        <a class="navButton" href="{$last.U_IMG}" title="{'last_page'|@translate} : {$last.TITLE}" rel="last"><img src="{$ROOT_URL}{$themeconf.icon_dir}/last.png" class="button" alt="{'last_page'|@translate}"></a>
40        {else}
41        <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/last_unactive.png" class="button" alt=""></a>
42        {/if}
43       
44        {if isset($slideshow.U_START_REPEAT)}
45        <a class="navButton" href="{$slideshow.U_START_REPEAT}" title="{'start_repeat'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/start_repeat.png" class="button" alt="{'start_repeat'|@translate}"></a>
46        {/if}
47       
48        {if isset($slideshow.U_STOP_REPEAT)}
49        <a class="navButton" href="{$slideshow.U_STOP_REPEAT}" title="{'stop_repeat'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_repeat.png" class="button" alt="{'stop_repeat'|@translate}"></a>
50        {/if}
51
52</div>
53
54<script type="text/javascript">// <![CDATA[
55{literal}
56function keyboardNavigation(e)
57{
58if(!e) e=window.event;
59if (e.altKey) return true;
60var target = e.target || e.srcElement;
61if (target && target.type) return true; //an input editable element
62var keyCode=e.keyCode || e.which;
63var docElem = document.documentElement;
64switch(keyCode) {
65{/literal}
66{if isset($next)}
67case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){ldelim}window.location="{$next.U_IMG}".replace( "&amp;", "&" ); return false; } break;
68{/if}
69{if isset($previous)}
70case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ldelim}window.location="{$previous.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
71{/if}
72{if isset($first)}
73/*Home*/case 36: if (e.ctrlKey){ldelim}window.location="{$first.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
74{/if}
75{if isset($last)}
76/*End*/case 35: if (e.ctrlKey){ldelim}window.location="{$last.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
77{/if}
78{if isset($U_UP) and !isset($slideshow)}
79/*Up*/case 38: if (e.ctrlKey){ldelim}window.location="{$U_UP|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
80{/if}
81
82{if isset($slideshow.U_START_PLAY)}
83/*Pause*/case 32: {ldelim}window.location="{$slideshow.U_START_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
84{/if}
85{if isset($slideshow.U_STOP_PLAY)}
86/*Play*/case 32: {ldelim}window.location="{$slideshow.U_STOP_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
87{/if}
88}
89return true;
90}
91document.onkeydown=keyboardNavigation;
92// ]]></script>
Note: See TracBrowser for help on using the repository browser.