Changeset 11966 for trunk/admin/themes


Ignore:
Timestamp:
Aug 18, 2011, 5:19:03 PM (13 years ago)
Author:
plg
Message:

feature 2407 added: display upload limitations before file selection (file
maximum size, maximum dimensions, allowed file types). The maximum dimensions
are calculated for GD only (because Imagick and External ImageMagick are not
using PHP memory as far as I could find on the web).

bug 2408 fixed: change term "old style form" into "browser uploader" and
"multiple file form" into "Flash Uploader" (based on WordPress user interface)

Location:
trunk/admin/themes/default
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/photos_add_direct.tpl

    r11962 r11966  
    143143  });
    144144
     145  jQuery("#uploadWarningsSummary a.showInfo").click(function() {
     146    jQuery("#uploadWarningsSummary").hide();
     147    jQuery("#uploadWarnings").show();
     148  });
     149
    145150{/literal}
    146151{if $upload_mode eq 'html'}
     
    187192    'fileExt'        : '*.jpg;*.JPG;*.jpeg;*.JPEG;*.png;*.PNG',
    188193    'sizeLimit'      : sizeLimit,
     194    'onSelect'       : function(event,ID,fileObj) {
     195      jQuery("#fileQueue").show();
     196    },
    189197    'onAllComplete'  : function(event, data) {
    190198      if (data.errors) {
     
    338346  <p id="batchLink"><a href="{$batch_link}">{$batch_label}</a></p>
    339347</fieldset>
    340 <p><a href="{$another_upload_link}">{'Add another set of photos'|@translate}</a></p>
     348<p style="margin:10px"><a href="{$another_upload_link}">{'Add another set of photos'|@translate}</a></p>
    341349{else}
    342350
     
    389397      <legend>{'Select files'|@translate}</legend>
    390398
     399    <p id="uploadWarningsSummary">{$upload_max_filesize_shorthand}B. {$upload_file_types}. {if isset($max_upload_resolution)}{$max_upload_resolution}Mpx{/if} <a class="showInfo" title="{'Learn more'|@translate}">i</a></p>
     400
     401    <p id="uploadWarnings">
     402{'Maximum file size: %sB.'|@translate|@sprintf:$upload_max_filesize_shorthand}
     403{'Allowed file types: %s.'|@translate|@sprintf:$upload_file_types}
     404  {if isset($max_upload_resolution)}
     405{'Approximate maximum resolution: %dM pixels (that\'s %dx%d pixels).'|@translate|@sprintf:$max_upload_resolution:$max_upload_width:$max_upload_height}
     406  {/if}
     407    </p>
     408
    391409{if $upload_mode eq 'html'}
    392     <p><a href="{$switch_url}">{'... or switch to the multiple files form'|@translate}</a></p>
    393 
    394       <p>{'JPEG files or ZIP archives with JPEG files inside please.'|@translate}</p>
    395 
    396410      <div id="uploadBoxes"></div>
    397411      <div id="addUploadBox">
    398412        <a href="javascript:">{'+ Add an upload box'|@translate}</a>
    399413      </div>
     414
     415    <p id="uploadModeInfos">{'You are using the Browser uploader. Try the <a href="%s">Flash uploader</a> instead.'|@translate|@sprintf:$switch_url}</p>
    400416   
    401417    </fieldset>
    402418
    403419    <p>
    404       <input class="submit" type="submit" name="submit_upload" value="{'Upload'|@translate}">
     420      <input class="submit" type="submit" name="submit_upload" value="{'Start Upload'|@translate}">
    405421    </p>
    406422{elseif $upload_mode eq 'multiple'}
     423
    407424    <p>
    408425      <input type="file" name="uploadify" id="uploadify">
    409426    </p>
    410427
    411     <p><a href="{$switch_url}">{'... or switch to the old style form'|@translate}</a></p>
    412 
    413     <div id="fileQueue"></div>
     428    <div id="fileQueue" style="display:none"></div>
     429
     430    <p id="uploadModeInfos">{'You are using the Flash uploader. Problems? Try the <a href="%s">Browser uploader</a> instead.'|@translate|@sprintf:$switch_url}</p>
    414431
    415432    </fieldset>
  • trunk/admin/themes/default/theme.css

    r11962 r11966  
    923923.pluginActions DIV {display: table-cell; vertical-align: middle; line-height:18px; }
    924924.showInfo {display:block;position:absolute;top:0;right:5px;width:15px;font-style:italic;font-family:"Georgia",serif;background-color:#464646;font-size:0.9em;border-radius:10px;-moz-border-radius:10px;}
     925.showInfo:hover {cursor:pointer}
    925926
    926927.warning:before {content:url(icon/warning.png);vertical-align:top;}
     
    10601061#mainConfCheck .transparent {opacity:0.5;filter:alpha(opacity=50);}
    10611062#mainConfCheck .order_by_is_custom {display:block;font-weight:normal;font-style:italic;margin-left:20px;}
     1063
     1064/* Upload Form */
     1065#uploadBoxes .file {margin-bottom:5px;text-align:left;}
     1066#uploadBoxes {margin-top:20px;}
     1067#addUploadBox {margin-bottom:2em;}
     1068
     1069p#uploadWarningsSummary {text-align:left;margin-bottom:1em;font-size:90%;color:#999;}
     1070p#uploadWarningsSummary .showInfo {position:static;display:inline;padding:1px 6px;margin-left:3px;}
     1071p#uploadWarnings {display:none;text-align:left;margin-bottom:1em;font-size:90%;color:#999;}
     1072p#uploadModeInfos {text-align:left;margin-top:1em;font-size:90%;color:#999;}
Note: See TracChangeset for help on using the changeset viewer.