From: Alan Date: Fri, 23 Sep 2022 03:26:36 +0000 (+0800) Subject: roojs-ui.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=ed2718a254a158759e5790fa72cd788a9f811e79 roojs-ui.js roojs-ui-debug.js roojs-all.js roojs-debug.js Roo/form/Radio.js --- diff --git a/Roo/form/Radio.js b/Roo/form/Radio.js index c2bc62d361..0b4148d70a 100644 --- a/Roo/form/Radio.js +++ b/Roo/form/Radio.js @@ -76,20 +76,15 @@ Roo.extend(Roo.form.Radio, Roo.form.Checkbox, { // this.el.dom.defaultChecked = this.checked; //} this.setChecked(String(v) === String(this.inputValue), suppressEvent); - this.inSetChecked = true; + this.el.dom.form[this.name] = v; - this.inSetChecked = false; + //this.fireEvent("check", this, this.checked); }, // private.. setChecked : function(state,suppressEvent) { - if (this.inSetChecked) { - this.checked = state; - return; - } - - + if(this.wrap){ this.wrap[state ? 'addClass' : 'removeClass']('x-menu-item-checked'); } diff --git a/roojs-all.js b/roojs-all.js index 27aaaf86cf..d6ff716bcd 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -1852,8 +1852,8 @@ this.el.on('DOMAttrModified',this.setFromHidden,this);this.el.on('propertychange // Roo/form/Radio.js Roo.form.Radio=function(){Roo.form.Radio.superclass.constructor.apply(this,arguments);};Roo.extend(Roo.form.Radio,Roo.form.Checkbox,{inputType:'radio',getGroupValue:function(){return this.el.up('form').child('input[name='+this.el.dom.name+']:checked',true).value; },onRender:function(ct,A){Roo.form.Checkbox.superclass.onRender.call(this,ct,A);if(this.inputValue!==undefined){this.el.dom.value=this.inputValue;}this.wrap=this.el.wrap({cls:"x-form-check-wrap"});if(this.boxLabel){this.wrap.createChild({tag:'label',htmlFor:this.el.id,cls:'x-form-cb-label',html:this.boxLabel} -);}if(this.checked){this.el.dom.checked='checked';}},setValue:function(v,A){this.setChecked(String(v)===String(this.inputValue),A);this.el.dom.form[this.name]=v;},setChecked:function(A,B){if(this.inSetChecked){this.checked=A;return;}if(this.wrap){this.wrap[A?'addClass':'removeClass']('x-menu-item-checked'); -}this.checked=A;if(B!==true){this.fireEvent('check',this,A);}this.inSetChecked=true;this.inSetChecked=false;}}); +);}if(this.checked){this.el.dom.checked='checked';}},setValue:function(v,A){this.setChecked(String(v)===String(this.inputValue),A);this.inSetChecked=true;this.el.dom.form[this.name]=v;this.inSetChecked=false;},setChecked:function(A,B){if(this.inSetChecked){this.checked=A; +return;}if(this.wrap){this.wrap[A?'addClass':'removeClass']('x-menu-item-checked');}this.checked=A;if(B!==true){this.fireEvent('check',this,A);}}}); // Roo/rtf/namespace.js Roo.rtf={}; // Roo/rtf/Hex.js diff --git a/roojs-debug.js b/roojs-debug.js index c9d160cc19..3ab75596d9 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -45134,7 +45134,9 @@ Roo.extend(Roo.form.Radio, Roo.form.Checkbox, { // this.el.dom.defaultChecked = this.checked; //} this.setChecked(String(v) === String(this.inputValue), suppressEvent); + this.inSetChecked = true; this.el.dom.form[this.name] = v; + this.inSetChecked = false; //this.fireEvent("check", this, this.checked); }, // private.. @@ -45153,10 +45155,9 @@ Roo.extend(Roo.form.Radio, Roo.form.Checkbox, { if(suppressEvent !== true){ this.fireEvent('check', this, state); } - this.inSetChecked = true; - this.inSetChecked = false; + } diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index d01af81e23..95fb95b53b 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -20635,7 +20635,9 @@ Roo.extend(Roo.form.Radio, Roo.form.Checkbox, { // this.el.dom.defaultChecked = this.checked; //} this.setChecked(String(v) === String(this.inputValue), suppressEvent); + this.inSetChecked = true; this.el.dom.form[this.name] = v; + this.inSetChecked = false; //this.fireEvent("check", this, this.checked); }, // private.. @@ -20654,10 +20656,9 @@ Roo.extend(Roo.form.Radio, Roo.form.Checkbox, { if(suppressEvent !== true){ this.fireEvent('check', this, state); } - this.inSetChecked = true; - this.inSetChecked = false; + } diff --git a/roojs-ui.js b/roojs-ui.js index 11fbf788d8..b47d962061 100644 --- a/roojs-ui.js +++ b/roojs-ui.js @@ -905,8 +905,8 @@ this.el.on('DOMAttrModified',this.setFromHidden,this);this.el.on('propertychange // Roo/form/Radio.js Roo.form.Radio=function(){Roo.form.Radio.superclass.constructor.apply(this,arguments);};Roo.extend(Roo.form.Radio,Roo.form.Checkbox,{inputType:'radio',getGroupValue:function(){return this.el.up('form').child('input[name='+this.el.dom.name+']:checked',true).value; },onRender:function(ct,A){Roo.form.Checkbox.superclass.onRender.call(this,ct,A);if(this.inputValue!==undefined){this.el.dom.value=this.inputValue;}this.wrap=this.el.wrap({cls:"x-form-check-wrap"});if(this.boxLabel){this.wrap.createChild({tag:'label',htmlFor:this.el.id,cls:'x-form-cb-label',html:this.boxLabel} -);}if(this.checked){this.el.dom.checked='checked';}},setValue:function(v,A){this.setChecked(String(v)===String(this.inputValue),A);this.el.dom.form[this.name]=v;},setChecked:function(A,B){if(this.inSetChecked){this.checked=A;return;}if(this.wrap){this.wrap[A?'addClass':'removeClass']('x-menu-item-checked'); -}this.checked=A;if(B!==true){this.fireEvent('check',this,A);}this.inSetChecked=true;this.inSetChecked=false;}}); +);}if(this.checked){this.el.dom.checked='checked';}},setValue:function(v,A){this.setChecked(String(v)===String(this.inputValue),A);this.inSetChecked=true;this.el.dom.form[this.name]=v;this.inSetChecked=false;},setChecked:function(A,B){if(this.inSetChecked){this.checked=A; +return;}if(this.wrap){this.wrap[A?'addClass':'removeClass']('x-menu-item-checked');}this.checked=A;if(B!==true){this.fireEvent('check',this,A);}}}); // Roo/rtf/namespace.js Roo.rtf={}; // Roo/rtf/Hex.js