From b767e82ec7bb04e747961e7ecee0e288fde719f0 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 16 Sep 2006 05:21:24 +0000 Subject: update ajax js files. --- framework/Web/Javascripts/js/compressed/ajax.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'framework/Web/Javascripts/js/compressed') diff --git a/framework/Web/Javascripts/js/compressed/ajax.js b/framework/Web/Javascripts/js/compressed/ajax.js index 7e9cf3ec..32893e07 100644 --- a/framework/Web/Javascripts/js/compressed/ajax.js +++ b/framework/Web/Javascripts/js/compressed/ajax.js @@ -47,8 +47,10 @@ catch(e) Prado.CallbackRequest.Exception.onException(null,e);}}},Exception:{"on500":function(request,transport,data) {var e=request.getHeaderData(Prado.CallbackRequest.ERROR_HEADER);Logger.error("Callback Server Error "+e.code,this.formatException(e));},'on200':function(request,transport,data) {if(transport.status<500) -{var msg='HTTP '+transport.status+" with response : \n";msg+=transport.responseText+"\n";msg+="Data : \n"+inspect(data)+"\n";msg+="Actions : \n";data=request.getHeaderData(Prado.CallbackRequest.ACTION_HEADER);if(data&&data.length>0) -{data.each(function(action) +{var msg='HTTP '+transport.status+" with response : \n";if(transport.responseText.trim().length>0) +msg+=transport.responseText+"\n";if(typeof(data)!="undefined"&&data!=null) +msg+="Data : \n"+inspect(data)+"\n";data=request.getHeaderData(Prado.CallbackRequest.ACTION_HEADER);if(data&&data.length>0) +{msg+="Actions : \n";data.each(function(action) {msg+=inspect(action)+"\n";});} Logger.info(msg);}},onException:function(request,e) {msg="";$H(e).each(function(item) @@ -266,7 +268,7 @@ Event.stop(evt);return false;},showTextBox:function() {Element.show(this.element);Element.hide(this.editField);},createEditorInput:function() {if(this.editField==null) this.createTextBox();this.editField.value=this.getText();},loadExternalText:function() -{this.editField.disabled=true;this.onLoadingText();options=new Array('__InlineEditor_loadExternalText__',this.getText());request=new Prado.CallbackRequest(this.options.EventTarget,this.options);request.setCausesValidation(false);request.setParameter(options);request.options.onSuccess=this.onloadExternalTextSuccess.bind(this);request.options.onFailure=this.onloadExternalTextFailure.bind(this);request.dispatch();},createTextBox:function() +{this.editField.disabled=true;this.onLoadingText();options=new Array('__InlineEditor_loadExternalText__',this.getText());request=new Prado.CallbackRequest(this.options.EventTarget,this.options);request.setCausesValidation(false);request.setCallbackParameter(options);request.options.onSuccess=this.onloadExternalTextSuccess.bind(this);request.options.onFailure=this.onloadExternalTextFailure.bind(this);request.dispatch();},createTextBox:function() {cssClass=this.element.className||'';inputName=this.options.EventTarget;options={'className':cssClass,name:inputName,id:this.options.TextBoxID};if(this.options.TextMode=='SingleLine') {if(this.options.MaxLength>0) options['maxlength']=this.options.MaxLength;this.editField=INPUT(options);} @@ -289,7 +291,7 @@ this.options.onEnterEditMode(this,null);},onTextBoxBlur:function(e) this.onTextChanged(text);else {this.element.innerHTML=this.editField.value;this.isEditing=false;if(this.options.AutoHide) this.showLabel();}},onTextChanged:function(text) -{request=new Prado.CallbackRequest(this.options.EventTarget,this.options);request.setParameter(text);request.options.onSuccess=this.onTextChangedSuccess.bind(this);request.options.onFailure=this.onTextChangedFailure.bind(this);if(request.dispatch()) +{request=new Prado.CallbackRequest(this.options.EventTarget,this.options);request.setCallbackParameter(text);request.options.onSuccess=this.onTextChangedSuccess.bind(this);request.options.onFailure=this.onTextChangedFailure.bind(this);if(request.dispatch()) {this.isSaving=true;this.editField.disabled=true;}},onLoadingText:function() {},onloadExternalTextSuccess:function(request,parameter) {this.isEditing=true;this.editField.disabled=false;this.editField.value=this.getText();Prado.Element.focus(this.editField);},onloadExternalTextFailure:function(request,parameter) -- cgit v1.2.3