Changeset 27201 for extensions/Fotorama


Ignore:
Timestamp:
Feb 5, 2014, 10:43:02 AM (10 years ago)
Author:
JanisV
Message:

Improved Chrome fullscreen
Fix for Striped theme

Location:
extensions/Fotorama
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Fotorama/main.inc.php

    r27181 r27201  
    22/*
    33Plugin Name: Fotorama
    4 Version: 2.6.e
     4Version: 2.6.f
    55Description: Fotorama based full-screen slideshow
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=727
  • extensions/Fotorama/template/slideshow.tpl

    r27185 r27201  
    22{combine_script id='fotorama' require='jquery' load='header' path='plugins/Fotorama/fotorama/fotorama.js'}
    33
     4{literal}
     5<script type="text/javascript">
     6var image_w = {/literal}{$item_height}{literal}
     7var image_h = {/literal}{$item_height}{literal}
     8</script>
     9{/literal}
     10
    411<div id="slideshow">
    5         <div id="imageHeaderBar">
    6           <div class="browsePath">
    7                 {if isset($U_SLIDESHOW_STOP) }
     12  <div id="imageHeaderBar">
     13        <div class="browsePath">
     14          {if isset($U_SLIDESHOW_STOP) }
    815                [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ]
    9                 {/if}
    10                         <h2 class="showtitle">{$current.TITLE}</h2>
    11           </div>
     16          {/if}
     17          <h2 class="showtitle">{$current.TITLE}</h2>
    1218        </div>
     19  </div>
    1320
    14         <div id="imageToolBar">
    15           <div class="imageNumber">{$PHOTO}</div>
    16         </div>
     21  <div id="imageToolBar">
     22        <div class="imageNumber">{$PHOTO}</div>
     23  </div>
    1724
    18         <div id="content">
     25  <div id="content">
    1926        <div id="theImage">
    2027      <div class="fotorama" data-startindex="{$current_rank}" data-ratio="16/9" data-auto="false"
     
    3239      </div>
    3340        </div>
    34         </div>
    35 <div>
     41  </div>
     42</div>
    3643
    37 <script>
    38   $(function () {
    39     $('.fotorama')
     44{footer_script require='jquery'}{literal}
     45  var fullscreen = false;
     46  jQuery().ready(function() {
     47    jQuery('.fotorama')
    4048        // Listen to the events
    4149        .on('fotorama:showend ',
    4250            function (e, fotorama, extra) {
     51              if (!fullscreen) {
     52                history.replaceState(null, null, fotorama.activeFrame['url']+'&slideshow=');
     53                jQuery('#slideshow .browsePath a').attr('href', fotorama.activeFrame['url']);
     54                jQuery('#slideshow .showtitle').text(fotorama.activeFrame['title']);
     55                jQuery('#slideshow .imageNumber').text((fotorama.activeFrame['i'])+'/'+{/literal}{count($items)}{literal});
     56                document.title = fotorama.activeFrame['title'] + ' | {/literal}{$GALLERY_TITLE}{literal}';
     57              }
     58            }
     59        )
     60        .on('fotorama:fullscreenenter',
     61            function (e, fotorama, extra) {
     62              fullscreen = true;
     63              fotorama.startAutoplay();
     64            }
     65        )
     66        .on('fotorama:fullscreenexit',
     67            function (e, fotorama, extra) {
     68              fullscreen = false;
     69
    4370              history.replaceState(null, null, fotorama.activeFrame['url']+'&slideshow=');
    44               $('#slideshow .browsePath a').attr('href', fotorama.activeFrame['url']);
    45               $('#slideshow .showtitle').text(fotorama.activeFrame['title']);
    46               document.title = fotorama.activeFrame['title'] + ' | {$GALLERY_TITLE}';
    47               $('#slideshow .imageNumber').text((fotorama.activeFrame['i'])+'/'+{count($items)});
     71              jQuery('#slideshow .browsePath a').attr('href', fotorama.activeFrame['url']);
     72              jQuery('#slideshow .showtitle').text(fotorama.activeFrame['title']);
     73              jQuery('#slideshow .imageNumber').text((fotorama.activeFrame['i'])+'/'+{/literal}{count($items)}{literal});
     74              document.title = fotorama.activeFrame['title'] + ' | {/literal}{$GALLERY_TITLE}{literal}';
    4875            }
    4976        )
     
    5178        .fotorama();
    5279  });
    53 </script>
     80{/literal}{/footer_script}
Note: See TracChangeset for help on using the changeset viewer.