summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/source
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2013-11-03 18:52:45 +0100
committerFabio Bas <ctrlaltca@gmail.com>2013-11-26 11:42:48 +0100
commit5e82890b1e448c90c2a6d435afbd8207f472752d (patch)
tree6b83102bac654e9309412569d364181cb8fa6cf6 /framework/Web/Javascripts/source
parentb86da9746d741d50304cd05d005f1f576aec57ff (diff)
Ported TActiveFileUpload
Diffstat (limited to 'framework/Web/Javascripts/source')
-rwxr-xr-xframework/Web/Javascripts/source/prado/activefileupload/activefileupload.js54
1 files changed, 27 insertions, 27 deletions
diff --git a/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js b/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js
index 388bc7b0..29c9e3d4 100755
--- a/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js
+++ b/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js
@@ -5,13 +5,13 @@ Prado.WebUI.TActiveFileUpload = jQuery.klass(Prado.WebUI.Control,
this.options = options || {};
Prado.WebUI.TActiveFileUpload.register(this);
- this.input = $(options.inputID);
- this.flag = $(options.flagID);
- this.form = $(options.formID);
+ this.input = $('#'+options.inputID).get(0);
+ this.flag = $('#'+options.flagID).get(0);
+ this.form = $('#'+options.formID).get(0);
- this.indicator = $(options.indicatorID);
- this.complete = $(options.completeID);
- this.error = $(options.errorID);
+ this.indicator = $('#'+options.indicatorID).get(0);
+ this.complete = $('#'+options.completeID).get(0);
+ this.error = $('#'+options.errorID).get(0);
// set up events
if (options.autoPostBack){
@@ -47,21 +47,21 @@ Prado.WebUI.TActiveFileUpload = jQuery.klass(Prado.WebUI.Control,
finishUpload : function(options){
if (this.options.targetID == options.targetID)
- {
- this.finishoptions = options;
- var e = this;
- var callback =
- {
- 'CallbackParameter' : options || '',
- 'onSuccess' : function() { e.finishCallBack(true); },
- 'onFailure' : function() { e.finishCallBack(false); }
- };
+ {
+ this.finishoptions = options;
+ var e = this;
+ var callback =
+ {
+ 'CallbackParameter' : options || '',
+ 'onSuccess' : function() { e.finishCallBack(true); },
+ 'onFailure' : function() { e.finishCallBack(false); }
+ };
- Object.extend(callback, this.options);
+ jQuery.extend(callback, this.options);
- var request = new Prado.CallbackRequest(this.options.EventTarget, callback);
- request.dispatch();
- }
+ var request = new Prado.CallbackRequest(this.options.EventTarget, callback);
+ request.dispatch();
+ }
else
this.finishCallBack(true);
@@ -71,18 +71,18 @@ Prado.WebUI.TActiveFileUpload = jQuery.klass(Prado.WebUI.Control,
// hide the display indicator.
this.flag.value = '';
this.indicator.style.display = 'none';
- // show the complete indicator.
- if ((this.finishoptions.errorCode == 0) && (success)) {
- this.complete.style.display = '';
- this.input.value = '';
- } else {
- this.error.style.display = '';
- }
+ // show the complete indicator.
+ if ((this.finishoptions.errorCode == 0) && (success)) {
+ this.complete.style.display = '';
+ this.input.value = '';
+ } else {
+ this.error.style.display = '';
+ }
}
});
-Object.extend(Prado.WebUI.TActiveFileUpload,
+jQuery.extend(Prado.WebUI.TActiveFileUpload,
{
//class methods