Changeset 29393


Ignore:
Timestamp:
Sep 3, 2014, 7:33:29 PM (10 years ago)
Author:
mistic100
Message:

feature:2616 move "add files" and "start upload" buttons

Location:
trunk/admin/themes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/clear/theme.css

    r29249 r29393  
    306306  letter-spacing:1px;
    307307  border:none;
    308   background-color:#666666;
     308  background-color:#666;
    309309  color:#fff;
    310310  padding:2px 5px;
     
    322322}
    323323
     324.buttonLike:disabled, input[type="submit"]:disabled, input[type="button"]:disabled, input[type="reset"]:disabled {
     325  background-color:#999;
     326  color:#eee;
     327  cursor:not-allowed;
     328}
     329
    324330p.albumTitle img {margin-bottom:-3px;}
    325331
  • trunk/admin/themes/default/template/photos_add_direct.tpl

    r29389 r29393  
    6464        jQuery("#uploader").pluploadQueue({
    6565                // General settings
     66    browse_button : 'addFiles',
     67   
    6668                // runtimes : 'html5,flash,silverlight,html4',
    6769                runtimes : 'html5',
     
    6971                // url : '../upload.php',
    7072                url : 'ws.php?method=pwg.images.upload&format=json',
    71 
    72                 // User can upload no more then 20 files in one go (sets multiple_queues to false)
    73                 max_file_count: 100,
    7473               
    7574                chunk_size: '500kb',
     
    8685                // Rename files by clicking on their titles
    8786                // rename: true,
    88                
    89                 // Sort files
    90                 sortable: true,
    9187
    9288                // Enable ability to drag'n'drop files onto the widget (currently only HTML5 supports that)
     
    9692      Init: function (up, info) {
    9793        jQuery('#uploader_container').removeAttr("title"); //remove the "using runtime" text
     94       
     95        jQuery('#startUpload').on('click', function(e) {
     96            e.preventDefault();
     97            up.start();
     98          });
    9899      }
    99100    },
    100101
    101102    init : {
     103      // update custom button state on queue change
     104      QueueChanged : function(up) {
     105        jQuery('#startUpload').prop('disabled', up.files.length == 0);
     106      },
     107     
    102108      BeforeUpload: function(up, file) {
    103         console.log('[BeforeUpload]', file);
     109        //console.log('[BeforeUpload]', file);
     110       
     111        // hide buttons
     112        jQuery('#startUpload, #addFiles').hide();
    104113
    105114        // warn user if she wants to leave page while upload is running
     
    112121
    113122        // You can override settings before the file is uploaded
    114         // up.setOption('url', 'upload.php?id=' + file.id);
    115123        up.setOption(
    116124          'multipart_params',
     
    126134      FileUploaded: function(up, file, info) {
    127135        // Called when file has finished uploading
    128         console.log('[FileUploaded] File:', file, "Info:", info);
     136        //console.log('[FileUploaded] File:', file, "Info:", info);
     137       
     138        // hide item line
     139        jQuery('#'+file.id).hide();
    129140     
    130141        var data = jQuery.parseJSON(info.response);
     
    146157      UploadComplete: function(up, files) {
    147158        // Called when all files are either uploaded or failed
    148         console.log('[UploadComplete]');
     159        //console.log('[UploadComplete]');
    149160
    150161        jQuery(".selectAlbum, .selectFiles, #permissions, .showFieldset").hide();
     
    235246    <fieldset class="selectFiles" style="display:none">
    236247      <legend>{'Select files'|@translate}</legend>
     248     
     249      <button id="addFiles" class="buttonLike icon-plus-circled">{'Add Photos'|translate}</button>
    237250 
    238     {if isset($original_resize_maxheight)}<p class="uploadInfo">{'The picture dimensions will be reduced to %dx%d pixels.'|@translate:$original_resize_maxwidth:$original_resize_maxheight}</p>{/if}
    239 
    240     <p id="uploadWarningsSummary">{$upload_max_filesize_shorthand}B. {$upload_file_types}. {if isset($max_upload_resolution)}{$max_upload_resolution}Mpx{/if} <a class="icon-info-circled-1 showInfo" title="{'Learn more'|@translate}"></a></p>
    241 
    242     <p id="uploadWarnings">
    243 {'Maximum file size: %sB.'|@translate:$upload_max_filesize_shorthand}
    244 {'Allowed file types: %s.'|@translate:$upload_file_types}
    245   {if isset($max_upload_resolution)}
    246 {'Approximate maximum resolution: %dM pixels (that\'s %dx%d pixels).'|@translate:$max_upload_resolution:$max_upload_width:$max_upload_height}
    247   {/if}
    248     </p>
    249 
    250 
    251         <div id="uploader">
    252                 <p>Your browser doesn't have HTML5 support.</p>
    253         </div>
     251    {if isset($original_resize_maxheight)}
     252      <p class="uploadInfo">{'The picture dimensions will be reduced to %dx%d pixels.'|@translate:$original_resize_maxwidth:$original_resize_maxheight}</p>
     253    {/if}
     254
     255      <p id="uploadWarningsSummary">{$upload_max_filesize_shorthand}B. {$upload_file_types}. {if isset($max_upload_resolution)}{$max_upload_resolution}Mpx{/if} <a class="icon-info-circled-1 showInfo" title="{'Learn more'|@translate}"></a></p>
     256
     257      <p id="uploadWarnings">
     258        {'Maximum file size: %sB.'|@translate:$upload_max_filesize_shorthand}
     259        {'Allowed file types: %s.'|@translate:$upload_file_types}
     260      {if isset($max_upload_resolution)}
     261        {'Approximate maximum resolution: %dM pixels (that\'s %dx%d pixels).'|@translate:$max_upload_resolution:$max_upload_width:$max_upload_height}
     262      {/if}
     263      </p>
     264
     265      <div id="uploader">
     266        <p>Your browser doesn't have HTML5 support.</p>
     267      </div>
     268     
     269      <button id="startUpload" class="buttonLike icon-upload" disabled>{'Start Upload'|translate}</button>
    254270
    255271    </fieldset>
  • trunk/admin/themes/default/theme.css

    r29244 r29393  
    10091009#photosAddContent p.showFieldset {text-align:left;margin: 1em;}
    10101010
     1011#uploadForm .plupload_buttons { display:none; }
     1012#startUpload { margin:10px 0; padding:5px 10px; font-size:1.1em; }
     1013#startUpload:before { margin-right:0.5em; }
     1014#addFiles { margin-bottom:10px; }
     1015
    10111016#uploadProgress {width:650px; margin:10px auto;font-size:90%;}
    10121017#progressbar {border:1px solid #ccc; background-color:#eee;}
  • trunk/admin/themes/roma/theme.css

    r28702 r29393  
    240240}
    241241
     242.buttonLike:disabled, input[type="button"]:disabled, input[type="submit"]:disabled, input[type="reset"]:disabled {
     243        color:#666;
     244        border-color:#666;
     245  cursor:not-allowed;
     246}
     247
    242248.bigbutton { background:transparent url(images/quickLocalSync_inactiv.png) no-repeat scroll left top; display: block;
    243249color:#111; font-size:28px; height:161px; margin: 0 20px 0 auto; padding:0 18px 0; text-align:center; width:625px;
Note: See TracChangeset for help on using the changeset viewer.