X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs%2Fsymbols%2Fsrc%2FRoo_bootstrap_RadioSet.js.html;h=41dea55f2d670a91c1bd0994b8ff4cd1b129c435;hb=fbbb77a18c1088b6c292818bdab6a02b43d2849e;hp=016be9fc6fcf02849c393d45198942db8dd8072e;hpb=7e50fab448da8465d11c5e998629bf91d57ccc43;p=roojs1
diff --git a/docs/symbols/src/Roo_bootstrap_RadioSet.js.html b/docs/symbols/src/Roo_bootstrap_RadioSet.js.html
index 016be9fc6f..41dea55f2d 100644
--- a/docs/symbols/src/Roo_bootstrap_RadioSet.js.html
+++ b/docs/symbols/src/Roo_bootstrap_RadioSet.js.html
@@ -89,7 +89,7 @@
label.cls += ' col-md-' + this.labelWidth;
items = {
- cls : "col-md-" + (12 - this.labelWidth),
+ cls : "roo-radio-set-right col-md-" + (12 - this.labelWidth),
cn: [
items
]
@@ -103,7 +103,7 @@
{
tag : 'input',
cls : 'roo-radio-set-input',
- type : 'hidden',
+ type : 'text',
name : this.name,
value : this.value ? this.value : ''
},
@@ -112,6 +112,10 @@
]
};
+ if(this.weight.length){
+ cfg.cls += ' roo-radio-' + this.weight;
+ }
+
if(this.inline) {
cfg.cls += ' roo-radio-set-inline';
}
@@ -122,9 +126,17 @@
initEvents : function()
{
+ this.labelEl = this.el.select('.roo-radio-set-label', true).first();
+ this.labelEl.setVisibilityMode(Roo.Element.DISPLAY);
+
+ if(!this.fieldLabel.length){
+ this.labelEl.hide();
+ }
+
this.itemsEl = this.el.select('.roo-radio-set-items', true).first();
this.itemsEl.setVisibilityMode(Roo.Element.DISPLAY);
+ this.indicatorEl().setVisibilityMode(Roo.Element.DISPLAY);
this.indicatorEl().hide();
this.originalValue = this.getValue();
@@ -145,10 +157,6 @@
{
this.radioes.push(item);
- if(this.inline){
- item.el.addClass('radio-inline');
- }
-
},
validate : function()
@@ -176,7 +184,10 @@
markValid : function()
{
- this.indicatorEl().hide();
+ if(this.labelEl.isVisible(true)){
+ this.indicatorEl().hide();
+ }
+
this.el.removeClass([this.invalidClass, this.validClass]);
this.el.addClass(this.validClass);
@@ -189,7 +200,10 @@
return;
}
- this.indicatorEl().show();
+ if(this.labelEl.isVisible(true)){
+ this.indicatorEl().show();
+ }
+
this.el.removeClass([this.invalidClass, this.validClass]);
this.el.addClass(this.invalidClass);
@@ -198,13 +212,13 @@
},
setValue : function(v, suppressEvent)
- {
+ {
Roo.each(this.radioes, function(i){
i.checked = false;
i.el.removeClass('checked');
- if(i.value == v){
+ if(i.value === v || i.value.toString() === v.toString()){
i.checked = true;
i.el.addClass('checked');
@@ -215,8 +229,23 @@
}, this);
- Roo.bootstrap.RadioSet.superclass.setValue.call(this)
+ Roo.bootstrap.RadioSet.superclass.setValue.call(this, v);
+
+ },
+
+ clearInvalid : function(){
+
+ if(!this.el || this.preventMark){
+ return;
+ }
+
+ if(this.labelEl.isVisible(true)){
+ this.indicatorEl().hide();
+ }
+
+ this.el.removeClass([this.invalidClass]);
+ this.fireEvent('valid', this);
}
});