Sha256: 832bee920695ed73e2cb6e9423e10523a64677cf1cfa9b26768134c8dcbb8bfb

Contents?: true

Size: 1.25 KB

Versions: 20

Compression:

Stored size: 1.25 KB

Contents

var//RSence.Controls
HValidatorView = HControl.extend({

  controlDefaults: (HControlDefaults.extend({
    value: false,
    valueField: false
  })),

  setRect: function(_rect) {
    var _options = this.options;
    if(_options){
      if(_options.valueField){
        _rect.offsetTo(
          _options.valueField.rect.right,
          _options.valueField.rect.top
        );
      }
    }
    this.base(_rect);
  },
  
/** = Description
  * Ensures the value set is a Boolean.
  *
  * = Parameters
  * +_flag+::   True to set the status to selected, false to set to unselected.
  *
  **/
  setValue: function(_flag) {
    if (!_flag && _flag !== false) {
      _flag = false;
    }
    this.base(_flag);
  },

/** = Description
  * Updates the graphics to match the Boolean value.
  *
  **/
  refreshValue: function(){
    var _this = this,
        _value = _this.value,
        _trueValue = _value === true,
        _x = _trueValue?-21:0,
        _y = _this.enabled?0:-21,
        _title = _trueValue?'':_value,
        _elemId = _this.elemId;
    ELEM.setStyle(_elemId,'background-image',"url("+_this.getThemeGfxFile('validator.png')+")");
    ELEM.setStyle(_elemId,'background-repeat','no-repeat');
    ELEM.setStyle(_elemId,'background-position',_x+'px '+_y+'px');
  }

  
});

Version data entries

20 entries across 20 versions & 1 rubygems

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