Ignore:
Timestamp:
Dec 12, 2013, 2:12:13 PM (10 years ago)
Author:
mistic100
Message:

allow to configure only one downloadable size

Location:
extensions/BatchDownloader/admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/BatchDownloader/admin/config.php

    r23383 r25931  
    1111    'what'            => isset($_POST['what']) ? array_keys($_POST['what']) : array(),
    1212    'photo_size'      => $_POST['photo_size'],
     13    'multisize'       => $_POST['multisize'] == 'true',
    1314    'archive_prefix'  => trim($_POST['archive_prefix']),
    1415    'archive_timeout' => intval($_POST['archive_timeout']),
  • extensions/BatchDownloader/admin/template/config.tpl

    r23383 r25931  
    3131  }
    3232});
    33 {literal}
     33
    3434$("input[name='max_elements']").change(function() {
    3535  $("#max_elements").slider("value", $(this).val());
     
    4848  $(".advanced").slideDown();
    4949});
    50 {/literal}{/footer_script}
     50
     51$('input[name="multisize"]').on('change', function() {
     52  if ($(this).val() == 'true') {
     53    $('#multisize_title').text('{'Maximum photo size'|@translate|escape:javascript}');
     54  }
     55  else {
     56    $('#multisize_title').text('{'Photo size'|@translate|escape:javascript}');
     57  }
     58})
     59.filter(':checked').trigger('change');
     60{/footer_script}
     61
    5162
    5263<div class="titrePage">
     
    5970 
    6071  <ul>
     72    <li>
     73      <i>{'Warning: Only registered users can use Batch Downloader.'|@translate}</i>
     74    </li>
    6175    <li>
    6276      <label>
     
    8094    </li>
    8195    <li>
    82       <i>{'Warning: Only registered users can use Batch Downloader.'|@translate}</i>
    83     </li>
    84     <li>
    8596      <b>{'What can be downloaded?'|@translate}</b>
    8697      <label><input type="checkbox" name="what[categories]" {if in_array('categories',$batch_download.what)}checked="checked"{/if}/> {'Albums'|@translate}</label>
    8798      {if $USER_COLLEC_LOADED}<label><input type="checkbox" name="what[collections]" {if in_array('collections',$batch_download.what)}checked="checked"{/if}/> {'Collections'|@translate}</label>{/if}
    8899      <label><input type="checkbox" name="what[specials]" {if in_array('specials',$batch_download.what)}checked="checked"{/if}/> {'Specials'|@translate}</label>
    89       <a class="showInfo" title="{'Most visited'|@translate}, {'Random photos'|@translate}, {'Best rated'|@translate}...">i</a>
    90     </li>
    91     <li>
    92       <label>
    93         <b>{'Maximum photo size'|@translate}</b>
     100      <a class="icon-info-circled-1 showInfo" title="{'Most visited'|@translate}, {'Random photos'|@translate}, {'Best rated'|@translate}..."></a>
     101    </li>
     102    <li>
     103      <b>{'Photo size choices'|translate}</b>
     104      <label><input type="radio" name="multisize" value="true" {if $batch_download.multisize}checked{/if}> {'Any size'|translate}</label>
     105      <label><input type="radio" name="multisize" value="false" {if !$batch_download.multisize}checked{/if}> {'One size'|translate}</label>
     106
     107      <label>
     108        <b id="multisize_title">{'Maximum photo size'|@translate}</b>
    94109        <select name="photo_size">
    95110          {html_options options=$sizes_options selected=$batch_download.photo_size}
     
    135150        <b>{'Delete previous archive when starting to download another one'|@translate}</b>
    136151      </label>
    137       <a class="showInfo" title="{'It saves space on the server but doesn\'t allow to restart failed downloads.'|@translate}">i</a>
     152      <a class="icon-info-circled-1 showInfo" title="{'It saves space on the server but doesn\'t allow to restart failed downloads.'|@translate}"></a>
    138153    </li>
    139154    <li>
     
    142157        <b>{'Force the usage of PclZip instead of ZipArchive as ZIP library'|@translate}</b>
    143158      </label>
    144       <a class="showInfo" title="{'Only check if you are experiencing corrupted archives with ZipArchive.'|@translate}">i</a>
     159      <a class="icon-info-circled-1 showInfo" title="{'Only check if you are experiencing corrupted archives with ZipArchive.'|@translate}"></a>
    145160    </li>
    146161    <li>
     
    149164        <b>{'Don\'t download archives through PHP'|@translate}</b>
    150165      </label>
    151       <a class="showInfo" title="{'Only check if your host complains about high PHP usage.'|@translate}">i</a>
     166      <a class="icon-info-circled-1 showInfo" title="{'Only check if your host complains about high PHP usage.'|@translate}"></a>
    152167    </li>
    153168  {if $use_ziparchive}
  • extensions/BatchDownloader/admin/template/style.css

    r23383 r25931  
    4747}
    4848
    49 .showInfo {
    50   position:static;
    51   display:inline-block;
    52   padding:1px 6px;
    53   width:4px;
    54   height:14px;
    55   line-height:14px;
    56   font-size:0.8em;
    57 }
    58 
    5949.advanced span {
    6050  font-family: 'Courrier New',monospace;
Note: See TracChangeset for help on using the changeset viewer.