vendor/assets/javascripts/dijit/_CssStateMixin.js in dijit-rails-0.11.0 vs vendor/assets/javascripts/dijit/_CssStateMixin.js in dijit-rails-0.14.0
- old
+ new
@@ -1,20 +1,20 @@
//>>built
-define("dijit/_CssStateMixin",["dojo/_base/array","dojo/_base/declare","dojo/dom","dojo/dom-class","dojo/_base/lang","dojo/on","dojo/ready","dojo/_base/window","./registry"],function(_1,_2,_3,_4,_5,on,_6,_7,_8){
-var _9=_2("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:false,active:false,_applyAttributes:function(){
+define("dijit/_CssStateMixin",["dojo/_base/array","dojo/_base/declare","dojo/dom","dojo/dom-class","dojo/has","dojo/_base/lang","dojo/on","dojo/ready","dojo/_base/window","./registry"],function(_1,_2,_3,_4,_5,_6,on,_7,_8,_9){
+var _a=_2("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:false,active:false,_applyAttributes:function(){
this.inherited(arguments);
-_1.forEach(["disabled","readOnly","checked","selected","focused","state","hovering","active","_opened"],function(_a){
-this.watch(_a,_5.hitch(this,"_setStateClass"));
+_1.forEach(["disabled","readOnly","checked","selected","focused","state","hovering","active","_opened"],function(_b){
+this.watch(_b,_6.hitch(this,"_setStateClass"));
},this);
for(var ap in this.cssStateNodes){
this._trackMouseState(this[ap],this.cssStateNodes[ap]);
}
this._trackMouseState(this.domNode,this.baseClass);
this._setStateClass();
-},_cssMouseEvent:function(_b){
+},_cssMouseEvent:function(_c){
if(!this.disabled){
-switch(_b.type){
+switch(_c.type){
case "mouseover":
this._set("hovering",true);
this._set("active",this._mouseDown);
break;
case "mouseout":
@@ -30,143 +30,143 @@
this._set("active",false);
break;
}
}
},_setStateClass:function(){
-var _c=this.baseClass.split(" ");
-function _d(_e){
-_c=_c.concat(_1.map(_c,function(c){
-return c+_e;
-}),"dijit"+_e);
+var _d=this.baseClass.split(" ");
+function _e(_f){
+_d=_d.concat(_1.map(_d,function(c){
+return c+_f;
+}),"dijit"+_f);
};
if(!this.isLeftToRight()){
-_d("Rtl");
+_e("Rtl");
}
-var _f=this.checked=="mixed"?"Mixed":(this.checked?"Checked":"");
+var _10=this.checked=="mixed"?"Mixed":(this.checked?"Checked":"");
if(this.checked){
-_d(_f);
+_e(_10);
}
if(this.state){
-_d(this.state);
+_e(this.state);
}
if(this.selected){
-_d("Selected");
+_e("Selected");
}
if(this._opened){
-_d("Opened");
+_e("Opened");
}
if(this.disabled){
-_d("Disabled");
+_e("Disabled");
}else{
if(this.readOnly){
-_d("ReadOnly");
+_e("ReadOnly");
}else{
if(this.active){
-_d("Active");
+_e("Active");
}else{
if(this.hovering){
-_d("Hover");
+_e("Hover");
}
}
}
}
if(this.focused){
-_d("Focused");
+_e("Focused");
}
-var tn=this.stateNode||this.domNode,_10={};
+var tn=this.stateNode||this.domNode,_11={};
_1.forEach(tn.className.split(" "),function(c){
-_10[c]=true;
+_11[c]=true;
});
if("_stateClasses" in this){
_1.forEach(this._stateClasses,function(c){
-delete _10[c];
+delete _11[c];
});
}
-_1.forEach(_c,function(c){
-_10[c]=true;
+_1.forEach(_d,function(c){
+_11[c]=true;
});
-var _11=[];
-for(var c in _10){
-_11.push(c);
+var _12=[];
+for(var c in _11){
+_12.push(c);
}
-tn.className=_11.join(" ");
-this._stateClasses=_c;
-},_subnodeCssMouseEvent:function(_12,_13,evt){
+tn.className=_12.join(" ");
+this._stateClasses=_d;
+},_subnodeCssMouseEvent:function(_13,_14,evt){
if(this.disabled||this.readOnly){
return;
}
-function _14(_15){
-_4.toggle(_12,_13+"Hover",_15);
+function _15(_16){
+_4.toggle(_13,_14+"Hover",_16);
};
-function _16(_17){
-_4.toggle(_12,_13+"Active",_17);
+function _17(_18){
+_4.toggle(_13,_14+"Active",_18);
};
-function _18(_19){
-_4.toggle(_12,_13+"Focused",_19);
+function _19(_1a){
+_4.toggle(_13,_14+"Focused",_1a);
};
switch(evt.type){
case "mouseover":
-_14(true);
+_15(true);
break;
case "mouseout":
-_14(false);
-_16(false);
+_15(false);
+_17(false);
break;
case "mousedown":
case "touchstart":
-_16(true);
+_17(true);
break;
case "mouseup":
case "touchend":
-_16(false);
+_17(false);
break;
case "focus":
case "focusin":
-_18(true);
+_19(true);
break;
case "blur":
case "focusout":
-_18(false);
+_19(false);
break;
}
-},_trackMouseState:function(_1a,_1b){
-_1a._cssState=_1b;
+},_trackMouseState:function(_1b,_1c){
+_1b._cssState=_1c;
}});
-_6(function(){
-function _1c(evt){
+_7(function(){
+function _1d(evt){
if(!_3.isDescendant(evt.relatedTarget,evt.target)){
-for(var _1d=evt.target;_1d&&_1d!=evt.relatedTarget;_1d=_1d.parentNode){
-if(_1d._cssState){
-var _1e=_8.getEnclosingWidget(_1d);
-if(_1e){
-if(_1d==_1e.domNode){
-_1e._cssMouseEvent(evt);
+for(var _1e=evt.target;_1e&&_1e!=evt.relatedTarget;_1e=_1e.parentNode){
+if(_1e._cssState){
+var _1f=_9.getEnclosingWidget(_1e);
+if(_1f){
+if(_1e==_1f.domNode){
+_1f._cssMouseEvent(evt);
}else{
-_1e._subnodeCssMouseEvent(_1d,_1d._cssState,evt);
+_1f._subnodeCssMouseEvent(_1e,_1e._cssState,evt);
}
}
}
}
}
};
-function _1f(evt){
+function _20(evt){
evt.target=evt.srcElement;
-_1c(evt);
+_1d(evt);
};
-var _20=_7.body();
-_1.forEach(["mouseover","mouseout","mousedown","touchstart","mouseup","touchend"],function(_21){
-if(_20.addEventListener){
-_20.addEventListener(_21,_1c,true);
+var _21=_8.body(),_22=(_5("touch")?[]:["mouseover","mouseout"]).concat(["mousedown","touchstart","mouseup","touchend"]);
+_1.forEach(_22,function(_23){
+if(_21.addEventListener){
+_21.addEventListener(_23,_1d,true);
}else{
-_20.attachEvent("on"+_21,_1f);
+_21.attachEvent("on"+_23,_20);
}
});
-on(_20,"focusin, focusout",function(evt){
-var _22=evt.target;
-if(_22._cssState&&!_22.getAttribute("widgetId")){
-var _23=_8.getEnclosingWidget(_22);
-_23._subnodeCssMouseEvent(_22,_22._cssState,evt);
+on(_21,"focusin, focusout",function(evt){
+var _24=evt.target;
+if(_24._cssState&&!_24.getAttribute("widgetId")){
+var _25=_9.getEnclosingWidget(_24);
+_25._subnodeCssMouseEvent(_24,_24._cssState,evt);
}
});
});
-return _9;
+return _a;
});