- Timestamp:
- Aug 27, 2011, 11:58:30 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/themes/default/template/photos_add_direct.tpl
r11975 r12005 2 2 {combine_script id='jquery.jgrowl' load='footer' require='jquery' path='themes/default/js/plugins/jquery.jgrowl_minimized.js' } 3 3 {combine_script id='jquery.uploadify' load='footer' require='jquery' path='admin/include/uploadify/jquery.uploadify.v3.0.0.min.js' } 4 {combine_script id='jquery.ui.progressbar' load='footer'} 4 5 {combine_css path="admin/themes/default/uploadify.jGrowl.css"} 5 6 {combine_css path="admin/include/uploadify/uploadify.css"} … … 236 237 /* end of the queue */ 237 238 jQuery("#uploadedPhotos").prepend('<img src="'+data.thumbnail_url+'" class="thumbnail"> '); 239 }, 240 onUploadComplete: function(file,swfuploadifyQueue) { 241 var max = parseInt(jQuery("#progressMax").text()); 242 var next = parseInt(jQuery("#progressCurrent").text())+1; 243 var addToProgressBar = 2; 244 if (next <= max) { 245 jQuery("#progressCurrent").text(next); 246 } 247 else { 248 addToProgressBar = 1; 249 } 250 251 jQuery("#progressbar").progressbar({ 252 value: jQuery("#progressbar").progressbar("option", "value") + addToProgressBar 253 }); 238 254 } 239 255 }); … … 254 270 } 255 271 ); 272 273 nb_files = jQuery(".uploadifyQueueItem").size(); 274 jQuery("#progressMax").text(nb_files); 275 jQuery("#progressbar").progressbar({max: nb_files*2, value:1}); 276 jQuery("#progressCurrent").text(1); 277 278 jQuery("#uploadProgress").show(); 256 279 257 280 jQuery("#uploadify").uploadifyUpload(); … … 389 412 </p> 390 413 {elseif $upload_mode eq 'multiple'} 391 <p >414 <p style="margin-bottom:1em"> 392 415 <input class="submit" type="button" value="{'Start Upload'|@translate}"> 393 416 <input type="submit" name="submit_upload" style="display:none"> … … 396 419 </form> 397 420 421 <div id="uploadProgress" style="display:none"> 422 {'Photo %s of %s'|@translate|@sprintf:'<span id="progressCurrent">1</span>':'<span id="progressMax">10</span>'} 423 <br> 424 <div id="progressbar"></div> 425 </div> 426 398 427 <fieldset style="display:none"> 399 428 <legend>{'Uploaded Photos'|@translate}</legend>
Note: See TracChangeset
for help on using the changeset viewer.