add onAllComplete event to fileupload.js; hide mention helper during upload
This commit is contained in:
parent
b6dc32959c
commit
208a47162c
3 changed files with 337 additions and 313 deletions
|
|
@ -30,14 +30,14 @@
|
||||||
onSubmit: function(id, fileName){
|
onSubmit: function(id, fileName){
|
||||||
$('#file-upload').addClass("loading");
|
$('#file-upload').addClass("loading");
|
||||||
$('#publisher').find("input[type='submit']").attr('disabled','disabled');
|
$('#publisher').find("input[type='submit']").attr('disabled','disabled');
|
||||||
$("#publisher .options_and_submit").fadeIn(50);
|
$("div.mention_helper").fadeTo(100, 0, function() {
|
||||||
|
$("#publisher .options_and_submit, #fileInfo").fadeIn(50);
|
||||||
|
});
|
||||||
$("#publisher_spinner").fadeIn(100);
|
$("#publisher_spinner").fadeIn(100);
|
||||||
},
|
},
|
||||||
|
|
||||||
onComplete: function(id, fileName, responseJSON){
|
onComplete: function(id, fileName, responseJSON) {
|
||||||
$('#fileInfo').text(fileName + ' completed').fadeOut(2000);
|
$('#fileInfo').text(fileName + ' completed');
|
||||||
$("#publisher_spinner").fadeOut(100);
|
|
||||||
$('#file-upload').removeClass("loading");
|
|
||||||
var id = responseJSON.data.photo.id;
|
var id = responseJSON.data.photo.id;
|
||||||
var url = responseJSON.data.photo.thumb_small;
|
var url = responseJSON.data.photo.thumb_small;
|
||||||
|
|
||||||
|
|
@ -70,6 +70,15 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
onAllComplete: function(completed_files){
|
||||||
|
$('#fileInfo').delay(1800).fadeOut(200, function() {
|
||||||
|
$("div.mention_helper").fadeTo(100, 100);
|
||||||
|
});
|
||||||
|
$("#publisher_spinner").fadeOut(100);
|
||||||
|
$('#file-upload').removeClass("loading");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
= hidden_field_tag 'aspect_ids[]', aspect_id.to_s
|
= hidden_field_tag 'aspect_ids[]', aspect_id.to_s
|
||||||
|
|
||||||
.options_and_submit
|
.options_and_submit
|
||||||
%div
|
%div.mention_helper
|
||||||
%i= t('.mention_helper_text')
|
%i= t('.mention_helper_text')
|
||||||
|
|
||||||
.right
|
.right
|
||||||
|
|
|
||||||
629
public/javascripts/vendor/fileuploader.js
vendored
629
public/javascripts/vendor/fileuploader.js
vendored
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue