source: extensions/floPure/Pure_clear_blue/template/picture_nav_buttons.tpl @ 5835

Last change on this file since 5835 was 5835, checked in by flop25, 14 years ago

first version for 2.1 ;

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