uploader now shows current file uploading, and progress
This commit is contained in:
parent
60dd2f8e60
commit
3a99ec3f8c
3 changed files with 7 additions and 1 deletions
|
|
@ -15,7 +15,8 @@
|
||||||
|
|
||||||
|
|
||||||
onProgress: function(id, fileName, loaded, total){
|
onProgress: function(id, fileName, loaded, total){
|
||||||
|
var progress = Math.round(loaded / total * 100 );
|
||||||
|
$('#fileInfo').text(fileName + ' ' + progress + '%');
|
||||||
},
|
},
|
||||||
|
|
||||||
onSubmit: function(id, fileName){
|
onSubmit: function(id, fileName){
|
||||||
|
|
@ -26,6 +27,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
onComplete: function(id, fileName, responseJSON){
|
onComplete: function(id, fileName, responseJSON){
|
||||||
|
$('#fileInfo').text(fileName + ' completed').fadeOut(2000);
|
||||||
$("#publisher_spinner").fadeOut(100);
|
$("#publisher_spinner").fadeOut(100);
|
||||||
$('#file-upload').removeClass("loading");
|
$('#file-upload').removeClass("loading");
|
||||||
var id = responseJSON.data.photo.id;
|
var id = responseJSON.data.photo.id;
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@
|
||||||
.options_and_submit
|
.options_and_submit
|
||||||
|
|
||||||
.right
|
.right
|
||||||
|
#fileInfo
|
||||||
= image_tag 'ajax-loader.gif', :class => 'hidden', :id => "publisher_spinner"
|
= image_tag 'ajax-loader.gif', :class => 'hidden', :id => "publisher_spinner"
|
||||||
- if aspect == :all
|
- if aspect == :all
|
||||||
= status.submit t('.share'), :title => t('.share_with_all'), :disable_with => t('.posting')
|
= status.submit t('.share'), :title => t('.share_with_all'), :disable_with => t('.posting')
|
||||||
|
|
|
||||||
|
|
@ -847,6 +847,8 @@ label
|
||||||
:style italic
|
:style italic
|
||||||
:display inline
|
:display inline
|
||||||
|
|
||||||
|
#fileInfo
|
||||||
|
:display inline
|
||||||
#image_picker
|
#image_picker
|
||||||
:margin
|
:margin
|
||||||
:top 5px
|
:top 5px
|
||||||
|
|
@ -1536,6 +1538,7 @@ ul.aspects
|
||||||
:left 600px
|
:left 600px
|
||||||
:top 0
|
:top 0
|
||||||
|
|
||||||
|
|
||||||
#profile_photo_upload
|
#profile_photo_upload
|
||||||
:margin
|
:margin
|
||||||
:top 5px
|
:top 5px
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue