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

Last change on this file since 9274 was 8183, checked in by Zaphod, 14 years ago

Changes for version 1.1.0 :

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