diff options
Diffstat (limited to '')
-rw-r--r-- | template-common/scripts.js | 2 | ||||
-rw-r--r-- | template/yoga/picture_nav_buttons.tpl | 36 |
2 files changed, 19 insertions, 19 deletions
diff --git a/template-common/scripts.js b/template-common/scripts.js index 4e5ef822f..519786ab7 100644 --- a/template-common/scripts.js +++ b/template-common/scripts.js @@ -79,7 +79,7 @@ Function.prototype.pwgBind = function() { return function() { return __method.apply(object, args); } } -PwgWS = function(urlRoot) +function PwgWS(urlRoot) { this.urlRoot = urlRoot; this.options = { diff --git a/template/yoga/picture_nav_buttons.tpl b/template/yoga/picture_nav_buttons.tpl index aca9b10bd..f5a8aa914 100644 --- a/template/yoga/picture_nav_buttons.tpl +++ b/template/yoga/picture_nav_buttons.tpl @@ -62,42 +62,42 @@ </div> -<script type="text/javascript"> +<script type="text/javascript">// <![CDATA[ {literal} function keyboardNavigation(e) { - if(!e) var e=window.event; - if (e.altKey) return true; - var target = e.target || e.srcElement; - if (target && target.type) return true; //an input editable element - var keyCode=e.keyCode || e.which; - var docElem = document.documentElement; - switch(keyCode) { + if(!e) e=window.event; + if (e.altKey) return true; + var target = e.target || e.srcElement; + if (target && target.type) return true; //an input editable element + var keyCode=e.keyCode || e.which; + var docElem = document.documentElement; + switch(keyCode) { {/literal} {if isset($next)} - case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){ldelim}window.location="{$next.U_IMG}".replace( "&", "&" ); return false; } break; + case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){ldelim}window.location="{$next.U_IMG}".replace( "&", "&" ); return false; } break; {/if} {if isset($previous)} - case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ldelim}window.location="{$previous.U_IMG|@escape:jasvascript}".replace("&","&"); return false; } break; + case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ldelim}window.location="{$previous.U_IMG|@escape:jasvascript}".replace("&","&"); return false; } break; {/if} {if isset($first)} - /*Home*/case 36: if (e.ctrlKey){ldelim}window.location="{$first.U_IMG|@escape:jasvascript}".replace("&","&"); return false; } break; + /*Home*/case 36: if (e.ctrlKey){ldelim}window.location="{$first.U_IMG|@escape:jasvascript}".replace("&","&"); return false; } break; {/if} {if isset($last)} - /*End*/case 35: if (e.ctrlKey){ldelim}window.location="{$last.U_IMG|@escape:jasvascript}".replace("&","&"); return false; } break; + /*End*/case 35: if (e.ctrlKey){ldelim}window.location="{$last.U_IMG|@escape:jasvascript}".replace("&","&"); return false; } break; {/if} {if isset($U_UP) and !isset($slideshow)} - /*Up*/case 38: if (e.ctrlKey){ldelim}window.location="{$U_UP|@escape:jasvascript}".replace("&","&"); return false; } break; + /*Up*/case 38: if (e.ctrlKey){ldelim}window.location="{$U_UP|@escape:jasvascript}".replace("&","&"); return false; } break; {/if} {if isset($slideshow.U_START_PLAY)} - /*Pause*/case 32: {ldelim}window.location="{$slideshow.U_START_PLAY|@escape:jasvascript}".replace("&","&"); return false; } break; + /*Pause*/case 32: {ldelim}window.location="{$slideshow.U_START_PLAY|@escape:jasvascript}".replace("&","&"); return false; } break; {/if} {if isset($slideshow.U_STOP_PLAY)} - /*Play*/case 32: {ldelim}window.location="{$slideshow.U_STOP_PLAY|@escape:jasvascript}".replace("&","&"); return false; } break; + /*Play*/case 32: {ldelim}window.location="{$slideshow.U_STOP_PLAY|@escape:jasvascript}".replace("&","&"); return false; } break; {/if} - } - return true; + } + return true; } document.onkeydown=keyboardNavigation; -</script> +// ]]></script> |