uploader now shows current file uploading, and progress

This commit is contained in:
maxwell 2010-11-21 23:44:20 -08:00
parent 60dd2f8e60
commit 3a99ec3f8c
3 changed files with 7 additions and 1 deletions

View file

@ -15,7 +15,8 @@
onProgress: function(id, fileName, loaded, total){
var progress = Math.round(loaded / total * 100 );
$('#fileInfo').text(fileName + ' ' + progress + '%');
},
onSubmit: function(id, fileName){
@ -26,6 +27,7 @@
},
onComplete: function(id, fileName, responseJSON){
$('#fileInfo').text(fileName + ' completed').fadeOut(2000);
$("#publisher_spinner").fadeOut(100);
$('#file-upload').removeClass("loading");
var id = responseJSON.data.photo.id;

View file

@ -39,6 +39,7 @@
.options_and_submit
.right
#fileInfo
= image_tag 'ajax-loader.gif', :class => 'hidden', :id => "publisher_spinner"
- if aspect == :all
= status.submit t('.share'), :title => t('.share_with_all'), :disable_with => t('.posting')

View file

@ -847,6 +847,8 @@ label
:style italic
:display inline
#fileInfo
:display inline
#image_picker
:margin
:top 5px
@ -1536,6 +1538,7 @@ ul.aspects
:left 600px
:top 0
#profile_photo_upload
:margin
:top 5px