diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2013-11-03 18:52:45 +0100 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2013-11-03 18:52:45 +0100 |
commit | 3e071f5b841904adf72ce66eab3e1be1558c35df (patch) | |
tree | 56521288be6084814239d1c32b42c84e9a9b5be6 /framework/Web/Javascripts/source | |
parent | e66682526c5d41d27746af5a57137dee3562e7b1 (diff) |
Ported TActiveFileUpload
Diffstat (limited to 'framework/Web/Javascripts/source')
-rwxr-xr-x | framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js | 54 |
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 |