diff options
Diffstat (limited to 'framework/Web/Javascripts/js/compressed/prado.js')
-rw-r--r-- | framework/Web/Javascripts/js/compressed/prado.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/framework/Web/Javascripts/js/compressed/prado.js b/framework/Web/Javascripts/js/compressed/prado.js index 9f8cdb19..9e0b9ba8 100644 --- a/framework/Web/Javascripts/js/compressed/prado.js +++ b/framework/Web/Javascripts/js/compressed/prado.js @@ -371,11 +371,17 @@ else {y_input=INPUT({type:'hidden',name:id+'_y','id':id+'_y',value:y});this.element.parentNode.appendChild(y_input);}}});Prado.WebUI.TRadioButton=Class.extend(Prado.WebUI.PostBackControl);Prado.WebUI.TRadioButton.prototype.onRadioButtonInitialize=Prado.WebUI.TRadioButton.prototype.initialize;Object.extend(Prado.WebUI.TRadioButton.prototype,{initialize:function(options) {this.element=$(options['ID']);if(!this.element.checked) this.onRadioButtonInitialize(options);}});Prado.WebUI.TTextBox=Class.extend(Prado.WebUI.PostBackControl,{onInit:function(options) -{if(options['TextMode']!='MultiLine') -Event.observe(this.element,"keydown",this.handleReturnKey.bind(this));Event.observe(this.element,"change",Prado.PostBack.bindEvent(this,options));},handleReturnKey:function(e) +{this.options=options;if(options['TextMode']!='MultiLine') +Event.observe(this.element,"keydown",this.handleReturnKey.bind(this));if(this.options['AutoPostBack']==true) +Event.observe(this.element,"change",Prado.PostBack.bindEvent(this,options));},handleReturnKey:function(e) {if(Event.keyCode(e)==Event.KEY_RETURN) {var target=Event.element(e);if(target) -{Event.fireEvent(target,"change");Event.stop(e);}}}});Prado.WebUI.TListControl=Class.extend(Prado.WebUI.PostBackControl,{onInit:function(options) +{if(this.options['AutoPostBack']==true) +{Event.fireEvent(target,"change");Event.stop(e);} +else +{if(this.options['CausesValidation']&&typeof(Prado.Validation)!="undefined") +{if(!Prado.Validation.validate(this.options['FormID'],this.options['ValidationGroup'],$(this.options['ID']))) +return Event.stop(e);}}}}}});Prado.WebUI.TListControl=Class.extend(Prado.WebUI.PostBackControl,{onInit:function(options) {Event.observe(this.element,"change",Prado.PostBack.bindEvent(this,options));}});Prado.WebUI.TListBox=Class.extend(Prado.WebUI.TListControl);Prado.WebUI.TDropDownList=Class.extend(Prado.WebUI.TListControl);Prado.WebUI.DefaultButton=Class.create();Prado.WebUI.DefaultButton.prototype={initialize:function(options) {this.options=options;this._event=this.triggerEvent.bindEvent(this);Event.observe(options['Panel'],'keydown',this._event);},triggerEvent:function(ev,target) {var enterPressed=Event.keyCode(ev)==Event.KEY_RETURN;var isTextArea=Event.element(ev).tagName.toLowerCase()=="textarea";if(enterPressed&&!isTextArea) @@ -392,6 +398,6 @@ window.clipboardData.setData("Text",text);},hover:function(obj) {obj.parentNode.className="copycode copycode_hover";},out:function(obj) {obj.parentNode.className="copycode";}});Prado.WebUI.TCheckBoxList=Base.extend({constructor:function(options) {for(var i=0;i<options.ItemCount;i++) -{var checkBoxOptions=Object.extend({ID:options.ListID+"_c"+i,EventTarget:options.ListID+"$c"+i},options);new Prado.WebUI.TCheckBox(checkBoxOptions);}}});Prado.WebUI.TRadioButtonList=Base.extend({constructor:function(options) +{var checkBoxOptions=Object.extend({ID:options.ListID+"_c"+i,EventTarget:options.ListName+"$c"+i},options);new Prado.WebUI.TCheckBox(checkBoxOptions);}}});Prado.WebUI.TRadioButtonList=Base.extend({constructor:function(options) {for(var i=0;i<options.ItemCount;i++) -{var radioButtonOptions=Object.extend({ID:options.ListID+"_c"+i,EventTarget:options.ListID+"$c"+i},options);new Prado.WebUI.TRadioButton(radioButtonOptions);}}});
\ No newline at end of file +{var radioButtonOptions=Object.extend({ID:options.ListID+"_c"+i,EventTarget:options.ListName+"$c"+i},options);new Prado.WebUI.TRadioButton(radioButtonOptions);}}});
\ No newline at end of file |