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

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

version 1.5.0

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