Changeset 30247


Ignore:
Timestamp:
Oct 21, 2014, 9:10:43 PM (9 years ago)
Author:
rvelices
Message:

modus added a pause button on slideshow when fotorama plugin is active

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/modus/template/fotorama.tpl

    r30053 r30247  
    33        <div class="imageNumber">{$PHOTO}</div>
    44        <div class="browsePath">
    5           {if isset($U_SLIDESHOW_STOP) }
    6                 [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|translate}</a> ]
     5          {if isset($U_SLIDESHOW_STOP)}
     6                <a href="{$U_SLIDESHOW_STOP}" title="{'stop the slideshow'|translate}" style="font-size:22px">◼</a>&nbsp;
    77          {/if}
     8                <a href="#" onclick="return fotoramaTogglePause();" title="{'slideshow'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
     9                <span class="pwg-icon pwg-icon-{if $Fotorama.autoplay}pause{else}play{/if}" id="togglePause"></span>
     10        </a>
     11{footer_script}
     12function fotoramaTogglePause() {
     13        if ($("#togglePause").hasClass("pwg-icon-pause")) {
     14                $(".fotorama").data("fotorama").stopAutoplay();
     15        }
     16        else {
     17                $(".fotorama").data("fotorama").startAutoplay();
     18        }
     19        $("#togglePause").toggleClass("pwg-icon-play pwg-icon-pause");
     20        return false;
     21}
     22{/footer_script}
    823          <h2 class="showtitle">{$current.TITLE}</h2>
    924        </div>
Note: See TracChangeset for help on using the changeset viewer.