Ignore:
Timestamp:
Oct 31, 2011, 3:39:26 PM (12 years ago)
Author:
plg
Message:

bug fixed: keyboard navigation available on Luciano (thanks to sichr.net for the tip)

bug fixed: compatibility with Google+1 plugin on picture.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/luciano/template/picture_nav_buttons.tpl

    r5921 r12534  
    1 {* $Id: picture_nav_buttons.tpl 2700 2008-10-10 13:11:31Z rvelices $ *}
    21<div class="navButtons">
    32
     
    5150
    5251</div>
    53 
    54 <script type="text/javascript">// <![CDATA[
    55 {literal}
    56 function keyboardNavigation(e)
    57 {
    58 if(!e) e=window.event;
    59 if (e.altKey) return true;
    60 var target = e.target || e.srcElement;
    61 if (target && target.type) return true; //an input editable element
    62 var keyCode=e.keyCode || e.which;
    63 var docElem = document.documentElement;
    64 switch(keyCode) {
    65 {/literal}
    66 {if isset($next)}
    67 case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){ldelim}window.location="{$next.U_IMG}".replace( "&amp;", "&" ); return false; } break;
    68 {/if}
    69 {if isset($previous)}
    70 case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ldelim}window.location="{$previous.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
    71 {/if}
    72 {if isset($first)}
    73 /*Home*/case 36: if (e.ctrlKey){ldelim}window.location="{$first.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
    74 {/if}
    75 {if isset($last)}
    76 /*End*/case 35: if (e.ctrlKey){ldelim}window.location="{$last.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
    77 {/if}
    78 {if isset($U_UP) and !isset($slideshow)}
    79 /*Up*/case 38: if (e.ctrlKey){ldelim}window.location="{$U_UP|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
    80 {/if}
    81 
    82 {if isset($slideshow.U_START_PLAY)}
    83 /*Pause*/case 32: {ldelim}window.location="{$slideshow.U_START_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
    84 {/if}
    85 {if isset($slideshow.U_STOP_PLAY)}
    86 /*Play*/case 32: {ldelim}window.location="{$slideshow.U_STOP_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
    87 {/if}
    88 }
    89 return true;
    90 }
    91 document.onkeydown=keyboardNavigation;
    92 // ]]></script>
Note: See TracChangeset for help on using the changeset viewer.