Ignore:
Timestamp:
Jun 24, 2012, 9:26:25 PM (12 years ago)
Author:
grum
Message:

feature:2664- compatibility with Piwigo 2.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/gally/gally-default/template/picture_nav_buttons.tpl

    r12632 r16016  
    22{if $DISPLAY_NAV_BUTTONS or isset($slideshow)}
    33
    4   {if isset($last)}
    5     <a id="icon_last" class="navButton" href="{$last.U_IMG}"
    6        title="{$last.TITLE}"
    7        rel="last"></a>
    8   {else}
    9     <a id="icon_last_unactive" class="navButton"></a>
    10   {/if}
    11 
    12   {if isset($next)}
    13     <a id="icon_right" class="navButton" href="{$next.U_IMG}"
    14        title="{$next.TITLE}"
     4{strip}{if isset($next)}
     5    <a href="{$next.U_IMG}"
     6       title="{'Next'|@translate} : {$next.TITLE}"
     7       id="icon_right" class="navButton"
    158       rel="next"></a>
    169  {else}
    1710    <a id="icon_right_unactive" class="navButton"></a>
    18   {/if}
     11  {/if}{/strip}
    1912
    20   {if isset($slideshow.U_START_PLAY)}
    21     <a id="icon_play" class="navButton" href="{$slideshow.U_START_PLAY}" title="{'Play of slideshow'|@translate}"></a>
    22   {/if}
     13{strip}{if isset($slideshow.U_START_PLAY)}
     14    <a href="{$slideshow.U_START_PLAY}" title="{'Play of slideshow'|@translate}" id="icon_play" class="navButton" ></a>
     15  {/if}{/strip}
    2316
    24   {if isset($slideshow.U_STOP_PLAY)}
    25     <a id="icon_pause" class="navButton" href="{$slideshow.U_STOP_PLAY}" title="{'Pause of slideshow'|@translate}"></a>
    26   {/if}
     17{strip}{if isset($slideshow.U_STOP_PLAY)}
     18    <a href="{$slideshow.U_STOP_PLAY}" title="{'Pause of slideshow'|@translate}" id="icon_pause" class="navButton" ></a>
     19  {/if}{/strip}
    2720
    28   {if isset($U_UP) and !isset($slideshow)}
    29     <a id="icon_up" class="navButton" href="{$U_UP}" title="{'Thumbnails'|@translate}" rel="up"></a>
    30   {/if}
     21{strip}{if isset($U_UP) and !isset($slideshow)}
     22    <a href="{$U_UP}" title="{'Thumbnails'|@translate}" rel="up" id="icon_up" class="navButton"></a>
     23  {/if}{/strip}
    3124
    32   {if isset($previous)}
    33     <a id="icon_left" class="navButton" href="{$previous.U_IMG}"
    34        title="{$previous.TITLE}"
     25{strip}{if isset($previous)}
     26    <a href="{$previous.U_IMG}"
     27       title="{'Previous'|@translate} : {$previous.TITLE}"
     28       id="icon_left" class="navButton"
    3529       rel="prev"></a>
    3630  {else}
    3731    <a id="icon_left_unactive" class="navButton"></a>
    38   {/if}
    39 
    40   {if isset($first)}
    41     <a id="icon_first" class="navButton" href="{$first.U_IMG}"
    42        title="{$first.TITLE}"
    43        rel="first"></a>
    44   {else}
    45     <a id="icon_first_unactive" class="navButton"></a>
    46   {/if}
    47 
     32  {/if}{/strip}
    4833
    4934  {if isset($slideshow.U_START_REPEAT)}
    50     <a id="icon_start_repeat" class="navButton" href="{$slideshow.U_START_REPEAT}" title="{'Repeat the slideshow'|@translate}"></a>
     35    <a href="{$slideshow.U_START_REPEAT}" title="{'Repeat the slideshow'|@translate}" id="icon_start_repeat" class="navButton" ></a>
    5136  {/if}
    5237
    5338  {if isset($slideshow.U_STOP_REPEAT)}
    54     <a id="icon_stop_repeat" class="navButton" href="{$slideshow.U_STOP_REPEAT}" title="{'Not repeat the slideshow'|@translate}"></a>
     39    <a href="{$slideshow.U_STOP_REPEAT}" title="{'Not repeat the slideshow'|@translate}" id="icon_stop_repeat" class="navButton" ></a>
    5540  {/if}
    5641
    5742  {if isset($slideshow)}
    5843    {if isset($slideshow.U_DEC_PERIOD)}
    59       <a id="icon_dec_period" class="navButton" href="{$slideshow.U_DEC_PERIOD}" title="{'Accelerate diaporama speed'|@translate}"></a>
     44      <a href="{$slideshow.U_DEC_PERIOD}" title="{'Accelerate diaporama speed'|@translate}" id="icon_dec_period" class="navButton"></a>
    6045    {else}
    6146      <a id="icon_dec_period_unactive" class="navButton" ></a>
     
    6348
    6449    {if isset($slideshow.U_INC_PERIOD)}
    65       <a id="icon_inc_period" class="navButton" href="{$slideshow.U_INC_PERIOD}" title="{'Reduce diaporama speed'|@translate}"></a>
     50      <a href="{$slideshow.U_INC_PERIOD}" title="{'Reduce diaporama speed'|@translate}" id="icon_inc_period" class="navButton" ></a>
    6651    {else}
    6752      <a id="icon_inc_period_unactive" class="navButton"></a>
     
    7055{/if}
    7156</div>
    72 
    73 <script type="text/javascript">// <![CDATA[
    74 {literal}
    75 function keyboardNavigation(e)
    76 {
    77   if(!e) e=window.event;
     57{strip}
     58{footer_script}
     59document.onkeydown = function(e){ldelim}
     60        e=e||window.event;
    7861  if (e.altKey) return true;
    79   var target = e.target || e.srcElement;
    80   if (target && target.type) return true; //an input editable element
    81   var keyCode=e.keyCode || e.which;
    82   var docElem = document.documentElement;
    83   switch(keyCode) {
    84 {/literal}
     62        var target=e.target||e.srcElement;
     63        if (target && target.type) return true;{* an input editable element *}
     64        var keyCode=e.keyCode||e.which, docElem=document.documentElement, url;
     65        switch(keyCode){ldelim}
    8566{if isset($next)}
    86   case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){ldelim}window.location="{$next.U_IMG}".replace( "&amp;", "&" ); return false; } break;
     67        case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth)url="{$next.U_IMG}"; break;
    8768{/if}
    8869{if isset($previous)}
    89   case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ldelim}window.location="{$previous.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     70        case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0)url="{$previous.U_IMG}"; break;
    9071{/if}
    9172{if isset($first)}
    92   /*Home*/case 36: if (e.ctrlKey){ldelim}window.location="{$first.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     73        {* Home *}case 36: if (e.ctrlKey)url="{$first.U_IMG}"; break;
    9374{/if}
    9475{if isset($last)}
    95   /*End*/case 35: if (e.ctrlKey){ldelim}window.location="{$last.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     76        {* End *}case 35: if (e.ctrlKey)url="{$last.U_IMG}"; break;
    9677{/if}
    9778{if isset($U_UP) and !isset($slideshow)}
    98   /*Up*/case 38: if (e.ctrlKey){ldelim}window.location="{$U_UP|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     79        {* Up *}case 38: if (e.ctrlKey)url="{$U_UP}"; break;
    9980{/if}
    100 
    10181{if isset($slideshow.U_START_PLAY)}
    102   /*Pause*/case 32: {ldelim}window.location="{$slideshow.U_START_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     82        {* Pause *}case 32: url="{$slideshow.U_START_PLAY}"; break;
    10383{/if}
    10484{if isset($slideshow.U_STOP_PLAY)}
    105   /*Play*/case 32: {ldelim}window.location="{$slideshow.U_STOP_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
     85        {* Play *}case 32: url="{$slideshow.U_STOP_PLAY}"; break;
    10686{/if}
    10787  }
     88  if (url) {ldelim}window.location=url.replace("&amp;","&"); return false;}
    10889  return true;
    10990}
    110 document.onkeydown=keyboardNavigation;
    111 // ]]></script>
     91{/footer_script}
     92{/strip}
Note: See TracChangeset for help on using the changeset viewer.