diff options
author | wei <> | 2006-01-21 02:15:43 +0000 |
---|---|---|
committer | wei <> | 2006-01-21 02:15:43 +0000 |
commit | 039ef5bb2acd9cde5073e4d20459f9d088f0892e (patch) | |
tree | 98db1b5917547a155dfb06a8ffcb43721edc3797 /framework | |
parent | 407aa2ff5d56859fcd1f47b85b4c4180d035c428 (diff) |
Fix autopost back
Diffstat (limited to 'framework')
-rw-r--r-- | framework/Web/Javascripts/js/prado.js | 8 | ||||
-rw-r--r-- | framework/Web/Javascripts/prado/controls.js | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/framework/Web/Javascripts/js/prado.js b/framework/Web/Javascripts/js/prado.js index f411cbcf..92224d76 100644 --- a/framework/Web/Javascripts/js/prado.js +++ b/framework/Web/Javascripts/js/prado.js @@ -2390,7 +2390,7 @@ _41.set(_42); Prado.WebUI=Class.create(); Prado.WebUI.PostBackControl=Class.create(); Object.extend(Prado.WebUI.PostBackControl.prototype,{initialize:function(_1){ -this.control=$(_1["ID"]); +this.element=$(_1["ID"]); if(_1["CausesValidation"]&&Prado.Validation){ Prado.Validation.AddTarget(_1["ID"],_1["ValidationGroup"]); } @@ -2408,7 +2408,7 @@ return _3; }; Prado.WebUI.TButton=Prado.WebUI.createPostBackComponent(); Prado.WebUI.ClickableComponent=Prado.WebUI.createPostBackComponent({onInit:function(_4){ -Event.observe(this.control,"click",Prado.PostBack.bindEvent(this,_4)); +Event.observe(this.element,"click",Prado.PostBack.bindEvent(this,_4)); }}); Prado.WebUI.TLinkButton=Prado.WebUI.ClickableComponent; Prado.WebUI.TCheckBox=Prado.WebUI.ClickableComponent; @@ -2416,7 +2416,7 @@ Prado.WebUI.TRadioButton=Prado.WebUI.ClickableComponent; Prado.WebUI.TBulletedList=Prado.WebUI.ClickableComponent; Prado.WebUI.TTextBox=Prado.WebUI.createPostBackComponent({onInit:function(_5){ if(_5["TextMode"]!="MultiLine"){ -Event.observe(this.element,"keypress",this.handleReturnKey.bind(this)); +Event.observe(this.element,"down",this.handleReturnKey.bind(this)); } Event.observe(this.element,"change",Prado.PostBack.bindEvent(this,_5)); },handleReturnKey:function(e){ @@ -2429,7 +2429,7 @@ Event.stop(e); } }}); Prado.WebUI.TListControl=Prado.WebUI.createPostBackComponent({onInit:function(_8){ -Event.observe(this.element.id,"change",Prado.PostBack.bindEvent(this,_8)); +Event.observe(this.element,"change",Prado.PostBack.bindEvent(this,_8)); }}); Prado.WebUI.TListBox=Prado.WebUI.TListControl; Prado.WebUI.TDropDownList=Prado.WebUI.TListControl; diff --git a/framework/Web/Javascripts/prado/controls.js b/framework/Web/Javascripts/prado/controls.js index d1720dfe..edc00e7f 100644 --- a/framework/Web/Javascripts/prado/controls.js +++ b/framework/Web/Javascripts/prado/controls.js @@ -6,7 +6,7 @@ Object.extend(Prado.WebUI.PostBackControl.prototype, {
initialize : function(options)
{
- this.control = $(options['ID']);
+ this.element = $(options['ID']);
if(options['CausesValidation'] && Prado.Validation)
Prado.Validation.AddTarget(options['ID'], options['ValidationGroup']);
@@ -34,7 +34,7 @@ Prado.WebUI.ClickableComponent = Prado.WebUI.createPostBackComponent( {
onInit : function(options)
{
- Event.observe(this.control, "click", Prado.PostBack.bindEvent(this,options));
+ Event.observe(this.element, "click", Prado.PostBack.bindEvent(this,options));
}
});
@@ -48,7 +48,7 @@ Prado.WebUI.TTextBox = Prado.WebUI.createPostBackComponent( onInit : function(options)
{
if(options['TextMode'] != 'MultiLine')
- Event.observe(this.element, "keypress", this.handleReturnKey.bind(this));
+ Event.observe(this.element, "down", this.handleReturnKey.bind(this));
Event.observe(this.element, "change", Prado.PostBack.bindEvent(this,options));
},
@@ -70,7 +70,7 @@ Prado.WebUI.TListControl = Prado.WebUI.createPostBackComponent( {
onInit : function(options)
{
- Event.observe(this.element.id, "change", Prado.PostBack.bindEvent(this,options));
+ Event.observe(this.element, "change", Prado.PostBack.bindEvent(this,options));
}
});
|