/* RSence * Copyright 2009 Riassence Inc. * http://riassence.com/ * * You should have received a copy of the GNU General Public License along * with this software package. If not, contact licensing@riassence.com */ /*** = Description ** This class is still at experimental phase. ** Please assume that the API _will_ change later. ** HCheckboxList is a combined list of HCheckboxes. ** ***/ var//RSence.Lists HCheckboxList = HListItemControl.extend({ /** = Description * Draws borders with 1px and sets 'overflow' to 'auto'. * **/ drawSubviews: function(){ this.setStyle('border','1px solid #999'); this.setStyle('border-radius','3px'); this.setStyle('overflow','auto'); }, listItems: [], listItemViews: [], ListCheckbox: HCheckbox.extend({ /** = Description * Adds listValues to the parent if they are true otherwise deletes them. * **/ refreshValue: function(){ this.base(); if(this.value === true){ this.parent.addItem( this.options.listValue ); } else{ this.parent.delItem( this.options.listValue ); } } }), // End ListCheckbox setEnabled: function(_state){ this.base(_state); if(!this['listItemViews']){ return; } for(var i=0;i