Sha256: 3387e66b0ec43c523e3e4e0c27d8e197cfe8f1f9d9beffb2fa2dc8965728bbd2

Contents?: true

Size: 1.92 KB

Versions: 8

Compression:

Stored size: 1.92 KB

Contents

//>>built
define("dijit/form/RangeBoundTextBox",["dojo/_base/declare","dojo/i18n","./MappedTextBox"],function(_1,_2,_3){
var _4=_1("dijit.form.RangeBoundTextBox",_3,{rangeMessage:"",rangeCheck:function(_5,_6){
return ("min" in _6?(this.compare(_5,_6.min)>=0):true)&&("max" in _6?(this.compare(_5,_6.max)<=0):true);
},isInRange:function(){
return this.rangeCheck(this.get("value"),this.constraints);
},_isDefinitelyOutOfRange:function(){
var _7=this.get("value");
if(_7==null){
return false;
}
var _8=false;
if("min" in this.constraints){
var _9=this.constraints.min;
_8=this.compare(_7,((typeof _9=="number")&&_9>=0&&_7!=0)?0:_9)<0;
}
if(!_8&&("max" in this.constraints)){
var _a=this.constraints.max;
_8=this.compare(_7,((typeof _a!="number")||_a>0)?_a:0)>0;
}
return _8;
},_isValidSubset:function(){
return this.inherited(arguments)&&!this._isDefinitelyOutOfRange();
},isValid:function(_b){
return this.inherited(arguments)&&((this._isEmpty(this.textbox.value)&&!this.required)||this.isInRange(_b));
},getErrorMessage:function(_c){
var v=this.get("value");
if(v!=null&&v!==""&&(typeof v!="number"||!isNaN(v))&&!this.isInRange(_c)){
return this.rangeMessage;
}
return this.inherited(arguments);
},postMixInProperties:function(){
this.inherited(arguments);
if(!this.rangeMessage){
this.messages=_2.getLocalization("dijit.form","validate",this.lang);
this.rangeMessage=this.messages.rangeMessage;
}
},_setConstraintsAttr:function(_d){
this.inherited(arguments);
if(this.focusNode){
if(this.constraints.min!==undefined){
this.focusNode.setAttribute("aria-valuemin",this.constraints.min);
}else{
this.focusNode.removeAttribute("aria-valuemin");
}
if(this.constraints.max!==undefined){
this.focusNode.setAttribute("aria-valuemax",this.constraints.max);
}else{
this.focusNode.removeAttribute("aria-valuemax");
}
}
},_setValueAttr:function(_e,_f){
this.focusNode.setAttribute("aria-valuenow",_e);
this.inherited(arguments);
},applyTextDir:function(){
}});
return _4;
});

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
dojo_rails-0.0.2 vendor/assets/javascripts/dijit/form/RangeBoundTextBox.js
dojo_rails-0.0.1 vendor/assets/javascripts/dijit/form/RangeBoundTextBox.js
dijit-rails-0.11.0 vendor/assets/javascripts/dijit/form/RangeBoundTextBox.js
dijit-rails-0.10.4 vendor/assets/javascripts/dijit/form/RangeBoundTextBox.js
dijit-rails-0.10.3 vendor/assets/javascripts/dijit/form/RangeBoundTextBox.js
dijit-rails-0.10.2 vendor/assets/javascripts/dijit/form/RangeBoundTextBox.js
dijit-rails-0.10.1 vendor/assets/javascripts/dijit/form/RangeBoundTextBox.js
dijit-rails-0.10.0 vendor/assets/javascripts/dijit/form/RangeBoundTextBox.js