Changeset 31575 for extensions


Ignore:
Timestamp:
Apr 26, 2016, 4:25:28 PM (9 years ago)
Author:
plg
Message:

equivalent to stripped r31389

compatibility with formats in Piwigo 2.8

Location:
extensions/stripped_responsive
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/stripped_responsive/template/picture.tpl

    r30101 r31575  
     1{combine_script id='core.switchbox' load='async' require='jquery' path='themes/default/js/switchbox.js'}
     2
    13{assign var=derivative value=$pwg->derivative($stripped_responsive.imageSize, $current.src_image)}
    24{assign var='size' value=$derivative->get_size()}
     
    3739                {strip}{if isset($current.U_DOWNLOAD)}
    3840          <li>
    39             <a href="{$current.U_DOWNLOAD}" title="{'download this file'|@translate}">
     41            <a id="downloadSwitchLink" href="{$current.U_DOWNLOAD}" title="{'Download this file'|@translate}">
    4042              <span class="pwg-icon pwg-icon-download"></span>
    4143              <span class="pwg-button-text">{'Download'|@translate}</span>
     
    4345          </li>
    4446                {/if}{/strip}
     47
     48{if !empty($current.formats)}
     49{footer_script require='jquery'}{literal}
     50jQuery().ready(function() {
     51  jQuery("#downloadSwitchLink").removeAttr("href");
     52 
     53  (window.SwitchBox=window.SwitchBox||[]).push("#downloadSwitchLink", "#downloadSwitchBox");
     54});
     55{/literal}{/footer_script}
     56 
     57<div id="downloadSwitchBox" class="switchBox">
     58  <div class="switchBoxTitle">{'Download'|translate} - {'Formats'|translate}</div>
     59  <ul>
     60  {foreach from=$current.formats item=format}
     61    <li><a href="{$format.download_url}" rel="nofollow">{$format.label}<span class="downloadformatDetails"> ({$format.filesize})</span></a></li>
     62  {/foreach}
     63  </ul>
     64</div>
     65{/if} {* has formats *}
     66
    4567                {strip}{if isset($PLUGIN_PICTURE_ACTIONS)}
    4668                        <li class="plugin_buttons plugin_buttons_group1">{$PLUGIN_PICTURE_ACTIONS}</li>
  • extensions/stripped_responsive/theme.css

    r30101 r31575  
    16241624}
    16251625
     1626.switchBox ul {
     1627  padding:0;
     1628  margin:0;
     1629}
     1630
     1631.switchBox ul li {
     1632  display:block;
     1633  float:none;
     1634}
     1635
    16261636.menu-random-photo .ammillustration#imrp_ill0 {
    16271637  padding: 0;
Note: See TracChangeset for help on using the changeset viewer.