source: trunk/template/default/picture_nav_buttons.tpl @ 5115

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

Bug corrected on picture_nav_buttons.tpl.
An error occured during gettex migration.

  • Property svn:eol-style set to LF
File size: 5.1 KB
Line 
1  <div class="navButtons">
2 
3{if isset($last)}
4  <a 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>
5{else}
6  <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/last_unactive.png" class="button" alt=""></a>
7{/if}
8 
9{if isset($next)}
10  <a 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>
11{else}
12  <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/right_unactive.png" class="button" alt=""></a>
13{/if}
14
15{if isset($slideshow.U_START_PLAY)}
16  <a 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>
17{/if}
18
19{if isset($slideshow.U_STOP_PLAY)}
20  <a 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>
21{/if}
22
23{if isset($U_UP) and !isset($slideshow)}
24  <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>
25{/if}
26 
27{if isset($previous)}
28  <a 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>
29{else}
30  <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/left_unactive.png" class="button" alt=""></a>
31{/if}
32 
33{if isset($first)}
34  <a 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>
35{else}
36  <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/first_unactive.png" class="button" alt=""></a>
37{/if}
38
39
40{if isset($slideshow.U_START_REPEAT)}
41  <a 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>
42{/if}
43
44{if isset($slideshow.U_STOP_REPEAT)}
45  <a 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>
46{/if}
47
48{if isset($slideshow)}
49  {if isset($slideshow.U_DEC_PERIOD)}
50    <a class="navButton" href="{$slideshow.U_DEC_PERIOD}" title="{'Accelerate diaporama speed'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/dec_period.png" class="button" alt="{'Accelerate diaporama speed'|@translate}"></a>
51  {else}
52    <a class="navButton"> <img src="{$ROOT_URL}{$themeconf.icon_dir}/dec_period_unactive.png" class="button" alt=""></a>
53  {/if}
54
55  {if isset($slideshow.U_INC_PERIOD)}
56    <a class="navButton" href="{$slideshow.U_INC_PERIOD}" title="{'Reduce diaporama speed'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/inc_period.png" class="button" alt="{'Reduce diaporama speed'|@translate}"></a>
57  {else}
58    <a class="navButton"> <img src="{$ROOT_URL}{$themeconf.icon_dir}/inc_period_unactive.png" class="button" alt=""></a>
59  {/if}
60{/if}
61
62  </div>
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.