mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-02-01 01:29:58 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4722 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5f7ba234e8
commit
54e9013ff2
1 changed files with 45 additions and 34 deletions
|
|
@ -52,7 +52,7 @@ function XEUploaderStart(obj) {
|
||||||
progressTarget : null,
|
progressTarget : null,
|
||||||
cancelButtonId : null
|
cancelButtonId : null
|
||||||
},
|
},
|
||||||
debug: false,
|
debug: true,
|
||||||
|
|
||||||
// Button settings
|
// Button settings
|
||||||
button_placeholder_id: dummy.id,
|
button_placeholder_id: dummy.id,
|
||||||
|
|
@ -103,6 +103,7 @@ function fileQueued(file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function fileQueueError(file, errorCode, message) {
|
function fileQueueError(file, errorCode, message) {
|
||||||
|
try {
|
||||||
switch(errorCode) {
|
switch(errorCode) {
|
||||||
case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED :
|
case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED :
|
||||||
alert("You have attempted to queue too many files.\n" + (message === 0 ? "You have reached the upload limit." : "You may select " + (message > 1 ? "up to " + message + " files." : "one file.")));
|
alert("You have attempted to queue too many files.\n" + (message === 0 ? "You have reached the upload limit." : "You may select " + (message > 1 ? "up to " + message + " files." : "one file.")));
|
||||||
|
|
@ -120,19 +121,25 @@ function fileQueueError(file, errorCode, message) {
|
||||||
alert("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
|
alert("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} catch(ex) {
|
||||||
|
this.debug(ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function fileDialogComplete(numFilesSelected, numFilesQueued) {
|
function fileDialogComplete(numFilesSelected, numFilesQueued) {
|
||||||
try {
|
try {
|
||||||
this.startUpload();
|
this.startUpload();
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
|
this.debug(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function uploadStart(file) {
|
function uploadStart(file) {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function uploadProgress(file, bytesLoaded, bytesTotal) {
|
function uploadProgress(file, bytesLoaded, bytesTotal) {
|
||||||
|
try {
|
||||||
var obj = xGetElementById(this.settings["fileListAreaID"]);
|
var obj = xGetElementById(this.settings["fileListAreaID"]);
|
||||||
|
|
||||||
var percent = Math.ceil((bytesLoaded / bytesTotal) * 100);
|
var percent = Math.ceil((bytesLoaded / bytesTotal) * 100);
|
||||||
|
|
@ -146,9 +153,16 @@ function uploadProgress(file, bytesLoaded, bytesTotal) {
|
||||||
} else {
|
} else {
|
||||||
obj.options[obj.options.length-1].text = text;
|
obj.options[obj.options.length-1].text = text;
|
||||||
}
|
}
|
||||||
|
} catch (ex) {
|
||||||
|
this.debug(ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function uploadSuccess(file, serverData) {
|
function uploadSuccess(file, serverData) {
|
||||||
|
try {
|
||||||
|
} catch (ex) {
|
||||||
|
this.debug(ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function uploadError(file, errorCode, message) {
|
function uploadError(file, errorCode, message) {
|
||||||
|
|
@ -185,20 +199,17 @@ function uploadError(file, errorCode, message) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
alert(ex);
|
this.debug(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function uploadComplete(file) {
|
function uploadComplete(file) {
|
||||||
if(this.getStats().files_queued === 0 ) {
|
try {
|
||||||
var fileListAreaID = this.settings["fileListAreaID"];
|
var fileListAreaID = this.settings["fileListAreaID"];
|
||||||
var uploadTargetSrl = this.settings["uploadTargetSrl"];
|
var uploadTargetSrl = this.settings["uploadTargetSrl"];
|
||||||
reloadFileList(this.settings);
|
reloadFileList(this.settings);
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
this.startUpload();
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
}
|
this.debug(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue