Create Profile\Attachment\Upload module class
- Add missing response type in AjaxUpload initializition
This commit is contained in:
parent
6bf65eb515
commit
969b4f991e
5 changed files with 185 additions and 13 deletions
|
@ -203,8 +203,9 @@ var FileBrowser = {
|
|||
if ($("#upload-file").length) {
|
||||
//AjaxUpload for files
|
||||
var file_uploader = new window.AjaxUpload("upload-file", {
|
||||
action: "wall_attach/" + FileBrowser.nickname + "?response=json",
|
||||
action: "profile/" + FileBrowser.nickname + "/attachment/upload?response=json",
|
||||
name: "userfile",
|
||||
responseType: "json",
|
||||
onSubmit: function (file, ext) {
|
||||
$(".fbrowser-content").hide();
|
||||
$(".fbrowser .profile-rotator-wrapper").show();
|
||||
|
@ -214,7 +215,7 @@ var FileBrowser = {
|
|||
if (response["error"] != undefined) {
|
||||
$(".error span").html(response["error"]);
|
||||
$(".error").removeClass("hidden");
|
||||
$("#profile-rotator").hide();
|
||||
$(".fbrowser .profile-rotator-wrapper").hide();
|
||||
$(".fbrowser-content").show();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ function enableOnUser(){
|
|||
|
||||
var file_uploader = new window.AjaxUpload(
|
||||
'wall-file-upload',
|
||||
{ action: 'wall_attach/{{$nickname}}',
|
||||
{ action: 'profile/{{$nickname}}/attachment/upload',
|
||||
name: 'userfile',
|
||||
onSubmit: function(file,ext) { $('#profile-rotator').show(); },
|
||||
onComplete: function(file,response) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue