Sha256: 2be632e618b0f9a157c943d43103797b76327e61afc2c5e3ce672910b0a9aced

Contents?: true

Size: 1.07 KB

Versions: 17

Compression:

Stored size: 1.07 KB

Contents

/*** = 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

17 entries across 17 versions & 1 rubygems

Version Path
rsence-pre-3.0.0.5 client/js/controls/checkbox/checkbox.js
rsence-pre-3.0.0.4 client/js/controls/checkbox/checkbox.js
rsence-pre-3.0.0.3 client/js/controls/checkbox/checkbox.js
rsence-pre-3.0.0.2 client/js/controls/checkbox/checkbox.js
rsence-pre-3.0.0.1 client/js/controls/checkbox/checkbox.js
rsence-pre-3.0.0.0 client/js/controls/checkbox/checkbox.js
rsence-pre-2.3.0.26 js/controls/checkbox/checkbox.js
rsence-pre-2.3.0.25 js/controls/checkbox/checkbox.js
rsence-pre-2.3.0.24 js/controls/checkbox/checkbox.js
rsence-pre-2.3.0.23 js/controls/checkbox/checkbox.js
rsence-pre-2.3.0.22 js/controls/checkbox/checkbox.js
rsence-pre-2.3.0.21 js/controls/checkbox/checkbox.js
rsence-pre-2.3.0.20 js/controls/checkbox/checkbox.js
rsence-pre-2.3.0.19 js/controls/checkbox/checkbox.js
rsence-pre-2.3.0.18 js/controls/checkbox/checkbox.js
rsence-pre-2.3.0.17 js/controls/checkbox/checkbox.js
rsence-pre-2.3.0.16 js/controls/checkbox/checkbox.js