client/js/lists/radiobuttonlist/radiobuttonlist.js in rsence-pre-3.0.0.10 vs client/js/lists/radiobuttonlist/radiobuttonlist.js in rsence-pre-3.0.0.11
- old
+ new
@@ -10,11 +10,11 @@
this.setStyle('border-radius','3px');
this.setStyle('overflow-y','auto');
},
listItems: [],
listItemViews: [],
-
+
/** = Description
* Setter function for listItems and listItemViews. Destroys
* the old HRadiabuttons before creating the new ones based on the
* listItems given as an parameter.
*
@@ -29,10 +29,11 @@
_listItems = this._cleanListItems(_listItems);
var _listItem,
_value,
_label,
_radioButton,
+ _component,
_selected = false,
i = 0;
for ( ; i < this.listItemViews.length; i++ ) {
try {
this.listItemViews[i].die();
@@ -75,27 +76,27 @@
}
}
}
this.refreshValue();
},
-
+
createComponent: function( i, _label ){
return HRadiobutton.nu(
[ 4, (i*23)+4, null, 23, 4, null ],
this, {
label: _label,
enabled: this.enabled,
value: false
}
);
},
-
+
_listItemResponder: null,
setListItemResponder: function(_listItemResponder){
this._listItemResponder = _listItemResponder;
},
-
+
/** = Description
* Destructor. Sets listItems and listItemViews to null and initiates
* destructor for radioButtonIndexValue.
*
**/
@@ -122,11 +123,11 @@
if(!this['listItemViews']){ return; }
for(var i=0;i<this.listItems.length;i++){
this.listItemViews[i].setEnabled(_state);
}
},
-
+
/** = Description
* RadioButtonIndexResponder sets the value based on which radiobutton is selected.
**/
RadioButtonIndexResponder: HValueResponder.extend({
constructor: function( _parent, _valueObj ){
@@ -148,12 +149,12 @@
this.parent.setValue( _value[0] );
}
}
}
}),
-
-
-
+
+
+
refreshValue: function(){
var _value = this.value;
if ( this.listItems && this.listItems.length !== 0 && this.valueMatrix !== undefined ) {
if ( this.radioButtonResponder === false ){
this.radioButtonIndexValue = HValue.nu( false, 0 );