Sha256: 06dbe6fa93b11355b44f047c2cbefeb0a8982938918713b9a9a2de69a745cb6c

Contents?: true

Size: 1.3 KB

Versions: 105

Compression:

Stored size: 1.3 KB

Contents

/*   RSence
 *   Copyright 2008 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
  ** Simple checkbox component, toggles the value of
  ** itself between true and false.
  ***/
var//RSence.Controls
HCheckbox = HButton.extend({
  componentName: 'checkbox',
  
  defaultEvents: {
    click: true
  },
  
/** Toggles the value checked / unchecked.
  **/
  click: function(){
    this.setValue(!this.value);
  },
/** SetStyle function for HCheckBox
  **/
  setStyle: function(_name,_value,_bypass){
    this.setStyleOfPart('label',_name,_value,_bypass);
  },
  
/**Toggles the checked/unchecked css-class status 
  according to the trueness of the value.**/
  refreshValue: function(){
    if(this.markupElemIds.control){
      if(this.value){
        this.toggleCSSClass(this.markupElemIds.control, 'checked', true);
        this.toggleCSSClass(this.markupElemIds.control, 'unchecked', false);
      }
      else{
        this.toggleCSSClass(this.markupElemIds.control, 'checked', false);
        this.toggleCSSClass(this.markupElemIds.control, 'unchecked', true);
      }
    }
  }
});
//-- Alias for some users:++
var//RSence.Controls
HCheckBox = HCheckbox;

Version data entries

105 entries across 105 versions & 2 rubygems

Version Path
rsence-pre-2.1.0.16 js/controls/checkbox/checkbox.js
rsence-pre-2.1.0.15 js/controls/checkbox/checkbox.js
rsence-pre-2.1.0.14 js/controls/checkbox/checkbox.js
rsence-pre-2.1.0.13 js/controls/checkbox/checkbox.js
rsence-pre-2.1.0.12 js/controls/checkbox/checkbox.js
rsence-pre-2.1.0.11 js/controls/checkbox/checkbox.js
rsence-pre-2.1.0.10 js/controls/checkbox/checkbox.js
rsence-pre-2.1.0.9 js/controls/checkbox/checkbox.js
rsence-pre-2.1.0.8.pre js/controls/checkbox/checkbox.js
rsence-pre-2.1.0.7.pre js/controls/checkbox/checkbox.js
rsence-pre-2.1.0.6.pre js/controls/checkbox/checkbox.js
rsence-pre-2.1.0.4.pre js/controls/checkbox/checkbox.js
rsence-pre-2.1.0.3.pre js/controls/checkbox/checkbox.js
rsence-pre-2.1.0.2.pre js/controls/checkbox/checkbox.js
rsence-pre-2.1.0.1.pre js/controls/checkbox/checkbox.js
rsence-2.0.9.23 js/controls/checkbox/checkbox.js
rsence-2.0.9.22.pre js/controls/checkbox/checkbox.js
rsence-2.0.9.21.pre js/controls/checkbox/checkbox.js
rsence-2.0.9.20.pre js/controls/checkbox/checkbox.js
rsence-2.0.8.19 js/controls/checkbox/checkbox.js