Changeset 27039


Ignore:
Timestamp:
Jan 29, 2014, 4:48:22 PM (7 years ago)
Author:
JanisV
Message:

Added processing for photo changing (title, stop URL, etc)

Location:
extensions/Fotorama
Files:
2 edited

Legend:

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

    r27035 r27039  
    7575        $row['derivative'] = $row['src_image'];
    7676      }
    77 /*
     77
    7878      $row['url'] = duplicate_picture_url(
    7979        array(
     
    8585          )
    8686        );
    87 */
     87
    8888      $row['TITLE'] = render_element_name($row);
    8989      $row['TITLE_ESC'] = str_replace('"', '"', $row['TITLE']);
  • extensions/Fotorama/template/slideshow.tpl

    r27034 r27039  
    1818        <div id="content">
    1919        <div id="theImage">
    20       <div class="fotorama" data-startindex="{$current_rank}" data-ratio="16/9" data-fit="scaledown"
     20      <div class="fotorama" data-startindex="{$current_rank}" data-ratio="16/9" data-fit="scaledown" data-auto="false"
    2121        data-width="100%" data-maxheight="100%" data-minheight="200" data-height="{$item_height}" data-allowfullscreen="native" data-autoplay=true data-stopautoplayontouch=false data-loop=true data-nav=false>
    2222      {foreach from=$items item=thumbnail}
    23         <a href="{$thumbnail['derivative']->get_url()}" data-full="{$thumbnail['derivative_big']->get_url()}"></a>
     23        <a href="{$thumbnail['derivative']->get_url()}" data-full="{$thumbnail['derivative_big']->get_url()}" data-url="{$thumbnail['url']}" data-title="{$thumbnail['TITLE']}"></a>
    2424      {/foreach}
    2525      </div>
     
    2727        </div>
    2828<div>
     29
     30<script>
     31  $(function () {
     32    $('.fotorama')
     33        // Listen to the events
     34        .on('fotorama:showend ',
     35            function (e, fotorama, extra) {
     36              console.log('active frame', fotorama.activeFrame);
     37              history.replaceState(null, null, fotorama.activeFrame['url']+'&slideshow=');
     38              $('#slideshow .browsePath a').attr('href', fotorama.activeFrame['url']);
     39              $('#slideshow .showtitle').text(fotorama.activeFrame['title']);
     40              document.title = fotorama.activeFrame['title'] + ' | {$GALLERY_TITLE}';
     41              $('#slideshow .imageNumber').text((fotorama.activeFrame['i'])+'/'+{count($items)});
     42            }
     43        )
     44        // Initialize fotorama manually
     45        .fotorama();
     46  });
     47</script>
Note: See TracChangeset for help on using the changeset viewer.