From 33b2284955a8f0015922d4c69c5082141b584f27 Mon Sep 17 00:00:00 2001 From: wei <> Date: Tue, 5 Dec 2006 23:37:07 +0000 Subject: load the inlineeditor textbox in client side onload. --- framework/Web/Javascripts/js/compressed/ajax.js | 2 +- framework/Web/Javascripts/js/debug/ajax.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'framework/Web/Javascripts/js') diff --git a/framework/Web/Javascripts/js/compressed/ajax.js b/framework/Web/Javascripts/js/compressed/ajax.js index 4e3bb18d..4b260ab3 100644 --- a/framework/Web/Javascripts/js/compressed/ajax.js +++ b/framework/Web/Javascripts/js/compressed/ajax.js @@ -276,7 +276,7 @@ this.time=setTimeout(this.checkChanges.bind(this),parseInt(this.options.Interval {var request=new Prado.CallbackRequest(this.options.EventTarget,this.options);var param={'OldValue':oldValue,'NewValue':newValue};request.setCallbackParameter(param);request.dispatch();}},{timers:{},register:function(timer) {Prado.WebUI.TValueTriggeredCallback.timers[timer.options.ID]=timer;},stop:function(id) {Prado.WebUI.TValueTriggeredCallback.timers[id].stopObserving();}});Prado.WebUI.TInPlaceTextBox=Base.extend({isSaving:false,isEditing:false,editField:null,constructor:function(options) -{this.options=Object.extend({LoadTextFromSource:false,TextMode:'SingleLine'},options||{});this.element=$(this.options.ID);Prado.WebUI.TInPlaceTextBox.register(this);this.initializeListeners();},initializeListeners:function() +{this.options=Object.extend({LoadTextFromSource:false,TextMode:'SingleLine'},options||{});this.element=$(this.options.ID);Prado.WebUI.TInPlaceTextBox.register(this);this.createEditorInput();this.initializeListeners();},initializeListeners:function() {this.onclickListener=this.enterEditMode.bindAsEventListener(this);Event.observe(this.element,'click',this.onclickListener);if(this.options.ExternalControl) Event.observe($(this.options.ExternalControl),'click',this.onclickListener);},enterEditMode:function(evt) {if(this.isSaving||this.isEditing)return;this.isEditing=true;this.onEnterEditMode();this.createEditorInput();this.showTextBox();this.editField.disabled=false;if(this.options.LoadTextOnEdit) diff --git a/framework/Web/Javascripts/js/debug/ajax.js b/framework/Web/Javascripts/js/debug/ajax.js index 65751d27..d26ad640 100644 --- a/framework/Web/Javascripts/js/debug/ajax.js +++ b/framework/Web/Javascripts/js/debug/ajax.js @@ -2457,6 +2457,7 @@ Prado.WebUI.TInPlaceTextBox = Base.extend( }, options || {}); this.element = $(this.options.ID); Prado.WebUI.TInPlaceTextBox.register(this); + this.createEditorInput(); this.initializeListeners(); }, -- cgit v1.2.3