Changeset 29622


Ignore:
Timestamp:
Sep 18, 2014, 2:03:06 PM (10 years ago)
Author:
JanisV
Message:

Added option for clicktransition=crossfade

Location:
extensions/Fotorama
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/Fotorama/admin.php

    r29615 r29622  
    1616    'replace_picture' => isset($_POST['replace_picture']),
    1717    'replace_picture_only_users' => isset($_POST['replace_picture_only_users']),
     18    'clicktransition_crossfade' => isset($_POST['clicktransition_crossfade']),
    1819    );
    1920  if (isset($_POST['allowfullscreen']))
  • extensions/Fotorama/language/ru_RU/plugin.lang.php

    r29615 r29622  
    1616$lang['Replace picture page'] = 'Заменить страницы с фотографиями';
    1717$lang['except an administrator'] = 'кроме администратора';
     18$lang['Use crossfade transition on click'] = 'Использовать стиль перехода crossfade при щелчке';
    1819
    1920?>
  • extensions/Fotorama/main.inc.php

    r29616 r29622  
    4040        $conf['Fotorama']['replace_picture'] = false;
    4141        $conf['Fotorama']['replace_picture_only_users'] = false;
     42        $conf['Fotorama']['clicktransition_crossfade'] = false;
    4243  }
    4344
  • extensions/Fotorama/maintain.inc.php

    r29615 r29622  
    2222    'replace_picture' => false,
    2323    'replace_picture_only_users' => false,
     24    'clicktransition_crossfade' => true,
    2425  );
    2526
  • extensions/Fotorama/template/admin.tpl

    r29621 r29622  
    4444      <option value="dissolve"{if $Fotorama.transition == 'dissolve'} selected{/if}>{'dissolve'|translate}</option>
    4545    </select>
     46  </li>
     47  <li>
     48    &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id="clicktransition_crossfade" name="clicktransition_crossfade"{if $Fotorama.clicktransition_crossfade} checked="checked"{/if}>
     49    <label for="clicktransition_crossfade">
     50      <b>{'Use crossfade transition on click'|translate}</b>
     51    </label>
    4652  </li>
    4753  <li>
     
    145151      jQuery('#nav').prop('disabled', false);
    146152    }
     153
     154    if (jQuery('#transition').val() == "slide") {
     155      jQuery('#clicktransition_crossfade').prop('disabled', false);
     156    }
     157    else {
     158      jQuery('#clicktransition_crossfade').prop('disabled', true);
     159      jQuery('#clicktransition_crossfade').removeAttr('checked');
     160    }
     161
     162    if(jQuery('#replace_picture').is(":checked")) {
     163      jQuery('#replace_picture_only_users').prop('disabled', false);
     164    }
     165    else {
     166      jQuery('#replace_picture_only_users').prop('disabled', true);
     167      jQuery('#replace_picture_only_users').removeAttr('checked');
     168    }
    147169  }
    148170  jQuery().ready(function() {
     
    155177    update_Fotorama_state();
    156178  });
     179  jQuery('#transition').change(function() {
     180    update_Fotorama_state();
     181  });
     182  jQuery('#replace_picture').change(function() {
     183    update_Fotorama_state();
     184  });
    157185 
    158186{/literal}{/footer_script}
  • extensions/Fotorama/template/slideshow.tpl

    r29621 r29622  
    2828        data-allowfullscreen="{$Fotorama.allowfullscreen}" data-autoplay="{if $Fotorama.autoplay}true{else}false{/if}"
    2929        data-transition="{$Fotorama.transition}" data-stopautoplayontouch="{if $Fotorama.stopautoplayontouch}true{else}false{/if}"
    30         data-loop="{if $Fotorama.loop}true{else}false{/if}" data-captions="false" data-thumbheight="{$Fotorama.thumbheight}" data-thumbwidth="{$Fotorama.thumbheight}">
     30        data-loop="{if $Fotorama.loop}true{else}false{/if}" data-captions="false" data-thumbheight="{$Fotorama.thumbheight}"
     31        data-thumbwidth="{$Fotorama.thumbheight}"{if $Fotorama.clicktransition_crossfade} data-clicktransition="crossfade"{/if}>
    3132      {foreach from=$items item=thumbnail}
    3233        <a href="{$thumbnail.derivative->get_url()}"
Note: See TracChangeset for help on using the changeset viewer.