Changeset 29398


Ignore:
Timestamp:
Sep 4, 2014, 10:52:29 AM (10 years ago)
Author:
JanisV
Message:

Improve captions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Fotorama/template/slideshow.tpl

    r29397 r29398  
    3030        data-allowfullscreen="{$Fotorama['allowfullscreen']}" data-autoplay="{if $Fotorama['autoplay']}true{else}false{/if}"
    3131        data-transition="{$Fotorama['transition']}" data-stopautoplayontouch="{if $Fotorama['stopautoplayontouch']}true{else}false{/if}"
    32         data-loop="{if $Fotorama['loop']}true{else}false{/if}">
     32        data-loop="{if $Fotorama['loop']}true{else}false{/if}" data-captions="false">
    3333      {foreach from=$items item=thumbnail}
    3434        <a href="{$thumbnail['derivative']->get_url()}"
    35           data-full="{$thumbnail['derivative_big']->get_url()}" data-url="{$thumbnail['url']}" data-title="{$thumbnail['TITLE']}"{if $Fotorama['enable_caption']} data-caption="{$thumbnail['TITLE']}"{/if}>
     35          data-full="{$thumbnail['derivative_big']->get_url()}" data-url="{$thumbnail['url']}" data-caption="{$thumbnail['TITLE']}">
    3636          {if $Fotorama['nav'] == 'thumbs' || $Fotorama['fullscreen_nav'] == 'thumbs'}<img src="{$thumbnail['derivative_thumb']->get_url()}">{/if}
    3737        </a>
     
    5252                history.replaceState(null, null, fotorama.activeFrame['url']+'&slideshow=');
    5353                jQuery('#slideshow .browsePath a').attr('href', fotorama.activeFrame['url']);
    54                 jQuery('#slideshow .showtitle').text(fotorama.activeFrame['title']);
     54                jQuery('#slideshow .showtitle').text(fotorama.activeFrame['caption']);
    5555                jQuery('#slideshow .imageNumber').text((fotorama.activeFrame['i'])+'/'+{/literal}{count($items)}{literal});
    56                 document.title = fotorama.activeFrame['title'] + ' | {/literal}{$GALLERY_TITLE|@escape:javascript}{literal}';
     56                document.title = fotorama.activeFrame['caption'] + ' | {/literal}{$GALLERY_TITLE|@escape:javascript}{literal}';
    5757              }
    5858            }
     
    6161            function (e, fotorama, extra) {
    6262              fotorama.setOptions({
    63                 nav: "{/literal}{$Fotorama['fullscreen_nav']}{literal}"
     63                nav: "{/literal}{$Fotorama['fullscreen_nav']}{literal}",
     64                {/literal}{if $Fotorama['enable_caption']}{literal}
     65                captions: "true",
     66                {/literal}{/if}{literal}
    6467              });
    6568              fotorama.startAutoplay();
     
    7679
    7780              fotorama.setOptions({
    78                 nav: "{/literal}{$Fotorama['nav']}{literal}"
     81                nav: "{/literal}{$Fotorama['nav']}{literal}",
     82                {/literal}{if $Fotorama['enable_caption']}{literal}
     83                captions: "false",
     84                {/literal}{/if}{literal}
    7985              });
    8086
    8187              history.replaceState(null, null, fotorama.activeFrame['url']+'&slideshow=');
    8288              jQuery('#slideshow .browsePath a').attr('href', fotorama.activeFrame['url']);
    83               jQuery('#slideshow .showtitle').text(fotorama.activeFrame['title']);
     89              jQuery('#slideshow .showtitle').text(fotorama.activeFrame['caption']);
    8490              jQuery('#slideshow .imageNumber').text((fotorama.activeFrame['i'])+'/'+{/literal}{count($items)}{literal});
    85               document.title = fotorama.activeFrame['title'] + ' | {/literal}{$GALLERY_TITLE|@escape:javascript}{literal}';
     91              document.title = fotorama.activeFrame['caption'] + ' | {/literal}{$GALLERY_TITLE|@escape:javascript}{literal}';
    8692
    8793              fullscreen = false;
Note: See TracChangeset for help on using the changeset viewer.