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