Changeset 2700 for trunk/template/yoga
- Timestamp:
- Oct 10, 2008, 3:11:31 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/template/yoga/picture_nav_buttons.tpl
r2478 r2700 63 63 </div> 64 64 65 <script type="text/javascript"> 65 <script type="text/javascript">// <![CDATA[ 66 66 {literal} 67 67 function keyboardNavigation(e) 68 68 { 69 if(!e) vare=window.event;70 71 72 73 74 75 69 if(!e) 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) { 76 76 {/literal} 77 77 {if isset($next)} 78 78 case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){ldelim}window.location="{$next.U_IMG}".replace( "&", "&" ); return false; } break; 79 79 {/if} 80 80 {if isset($previous)} 81 81 case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ldelim}window.location="{$previous.U_IMG|@escape:jasvascript}".replace("&","&"); return false; } break; 82 82 {/if} 83 83 {if isset($first)} 84 84 /*Home*/case 36: if (e.ctrlKey){ldelim}window.location="{$first.U_IMG|@escape:jasvascript}".replace("&","&"); return false; } break; 85 85 {/if} 86 86 {if isset($last)} 87 87 /*End*/case 35: if (e.ctrlKey){ldelim}window.location="{$last.U_IMG|@escape:jasvascript}".replace("&","&"); return false; } break; 88 88 {/if} 89 89 {if isset($U_UP) and !isset($slideshow)} 90 90 /*Up*/case 38: if (e.ctrlKey){ldelim}window.location="{$U_UP|@escape:jasvascript}".replace("&","&"); return false; } break; 91 91 {/if} 92 92 93 93 {if isset($slideshow.U_START_PLAY)} 94 94 /*Pause*/case 32: {ldelim}window.location="{$slideshow.U_START_PLAY|@escape:jasvascript}".replace("&","&"); return false; } break; 95 95 {/if} 96 96 {if isset($slideshow.U_STOP_PLAY)} 97 97 /*Play*/case 32: {ldelim}window.location="{$slideshow.U_STOP_PLAY|@escape:jasvascript}".replace("&","&"); return false; } break; 98 98 {/if} 99 100 99 } 100 return true; 101 101 } 102 102 document.onkeydown=keyboardNavigation; 103 </script>103 // ]]></script>
Note: See TracChangeset
for help on using the changeset viewer.