Changeset 29732 for extensions/Fotorama


Ignore:
Timestamp:
Sep 22, 2014, 1:53:23 PM (10 years ago)
Author:
JanisV
Message:

Added option for resizing

Location:
extensions/Fotorama
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/Fotorama/admin.php

    r29730 r29732  
    1818    'clicktransition_crossfade' => isset($_POST['clicktransition_crossfade']),
    1919    'close_button' => isset($_POST['close_button']),
     20    'resize' => isset($_POST['resize']),
    2021    );
    2122  if (isset($_POST['allowfullscreen']))
  • extensions/Fotorama/language/en_UK/plugin.lang.php

    r29730 r29732  
    1818$lang['Use crossfade transition on click'] = 'Use crossfade transition on click';
    1919$lang['Add close button'] = 'Add close button';
     20$lang['Resize to fit window'] = 'Resize to fit window';
    2021
    2122?>
  • extensions/Fotorama/language/ru_RU/plugin.lang.php

    r29730 r29732  
    1818$lang['Use crossfade transition on click'] = 'Использовать стиль перехода crossfade при щелчке';
    1919$lang['Add close button'] = 'Добавить кнопку закрытия';
     20$lang['Resize to fit window'] = 'Изменить размер по размеру окна';
    2021
    2122?>
  • extensions/Fotorama/main.inc.php

    r29730 r29732  
    4545  if (!isset($conf['Fotorama']['close_button'])) {
    4646        $conf['Fotorama']['close_button'] = false;
     47        $conf['Fotorama']['resize'] = false;
    4748  }
    4849
     
    107108      if ($skip >= 0)
    108109        $big_type = $def_type;
    109       if ($skip >= 1)
     110      if ($skip >= 1 and $conf['Fotorama']['resize'])
    110111        $next_type = $def_type;
    111112      if ($skip == 0)
  • extensions/Fotorama/maintain.inc.php

    r29730 r29732  
    2424    'clicktransition_crossfade' => true,
    2525    'close_button' => false,
     26    'resize' => false,
    2627  );
    2728
  • extensions/Fotorama/template/admin.tpl

    r29730 r29732  
    2222    <label for="only_fullscreen">
    2323      <b>{'Only fullscreen mode'|translate}</b>
     24    </label>
     25  </li>
     26  <li>
     27    <input type="checkbox" id="resize" name="resize"{if $Fotorama.resize} checked="checked"{/if}>
     28    <label for="resize">
     29      <b>{'Resize to fit window'|translate}</b>
    2430    </label>
    2531  </li>
     
    153159    if(jQuery('#only_fullscreen').is(":checked")) {
    154160      jQuery('#nav').prop('disabled', true);
     161      jQuery('#resize').prop('disabled', true);
    155162    }
    156163    else {
    157164      jQuery('#nav').prop('disabled', false);
     165      jQuery('#resize').prop('disabled', false);
    158166    }
    159167
  • extensions/Fotorama/template/fotorama-content.tpl

    r29730 r29732  
    9999    jQuery('.fotorama').data('fotorama').requestFullScreen();
    100100    {else}
    101     jQuery('.fotorama').data('fotorama').resize({
    102       height: jQuery(window).height()
    103     });
     101      {if $Fotorama.resize}
     102      jQuery('.fotorama').data('fotorama').resize({
     103        height: jQuery(window).height()
     104      });
     105      jQuery('html,body').animate({ scrollTop: jQuery('.fotorama').offset().top }, 'slow');
     106      {/if}
    104107    {/if}
    105108 
    106     $('html,body').animate({ scrollTop: jQuery('.fotorama').offset().top }, 'slow');
    107109  });
    108110
Note: See TracChangeset for help on using the changeset viewer.