2017-01-20 18:29:59 +01:00
|
|
|
define("dijit/_WidgetBase",["require","dojo/_base/array","dojo/aspect","dojo/_base/config","dojo/_base/connect","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/dom-construct","dojo/dom-geometry","dojo/dom-style","dojo/has","dojo/_base/kernel","dojo/_base/lang","dojo/on","dojo/ready","dojo/Stateful","dojo/topic","dojo/_base/window","./Destroyable","dojo/has!dojo-bidi?./_BidiMixin","./registry"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,_c,_d,_e,_f,on,_10,_11,_12,win,_13,_14,_15){_d.add("dijit-legacy-requires",!_e.isAsync);_d.add("dojo-bidi",false);if(_d("dijit-legacy-requires")){_10(0,function(){var _16=["dijit/_base/manager"];_1(_16);});}var _17={};function _18(obj){var ret={};for(var _19 in obj){ret[_19.toLowerCase()]=true;}return ret;};function _1a(_1b){return function(val){_8[val?"set":"remove"](this.domNode,_1b,val);this._set(_1b,val);};};function _1c(a,b){return a===b||(a!==a&&b!==b);};var _1d=_6("dijit._WidgetBase",[_11,_13],{id:"",_setIdAttr:"domNode",lang:"",_setLangAttr:_1a("lang"),dir:"",_setDirAttr:_1a("dir"),"class":"",_setClassAttr:{node:"domNode",type:"class"},_setTypeAttr:null,style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,ownerDocument:null,_setOwnerDocumentAttr:function(val){this._set("ownerDocument",val);},attributeMap:{},_blankGif:_4.blankGif||_1.toUrl("dojo/resources/blank.gif"),textDir:"",_introspect:function(){var _1e=this.constructor;if(!_1e._setterAttrs){var _1f=_1e.prototype,_20=_1e._setterAttrs=[],_21=(_1e._onMap={});for(var _22 in _1f.attributeMap){_20.push(_22);}for(_22 in _1f){if(/^on/.test(_22)){_21[_22.substring(2).toLowerCase()]=_22;}if(/^_set[A-Z](.*)Attr$/.test(_22)){_22=_22.charAt(4).toLowerCase()+_22.substr(5,_22.length-9);if(!_1f.attributeMap||!(_22 in _1f.attributeMap)){_20.push(_22);}}}}},postscript:function(_23,_24){this.create(_23,_24);},create:function(_25,_26){this._introspect();this.srcNodeRef=_7.byId(_26);this._connects=[];this._supportingWidgets=[];if(this.srcNodeRef&&this.srcNodeRef.id&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_25){this.params=_25;_f.mixin(this,_25);}this.postMixInProperties();if(!this.id){this.id=_15.getUniqueId(this.declaredClass.replace(/\./g,"_"));if(this.params){delete this.params.id;}}this.ownerDocument=this.ownerDocument||(this.srcNodeRef?this.srcNodeRef.ownerDocument:document);this.ownerDocumentBody=win.body(this.ownerDocument);_15.add(this);this.buildRendering();var _27;if(this.domNode){this._applyAttributes();var _28=this.srcNodeRef;if(_28&&_28.parentNode&&this.domNode!==_28){_28.parentNode.replaceChild(this.domNode,_28);_27=true;}this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(_27){delete this.srcNodeRef;}this._created=true;},_applyAttributes:function(){var _29={};for(var key in this.params||{}){_29[key]=this._get(key);}_2.forEach(this.constructor._setterAttrs,function(key){if(!(key in _29)){var val=this._get(key);if(val){this.set(key,val);}}},this);for(key in _29){this.set(key,_29[key]);}},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode){this.domNode=this.srcNodeRef||this.ownerDocument.createElement("div");}if(this.baseClass){var _2a=this.baseClass.split(" ");if(!this.isLeftToRight()){_2a=_2a.concat(_2.map(_2a,function(_2b){return _2b+"Rtl";}));}_9.add(this.domNode,_2a);}},postCreate:function(){},startup:function(){if(this._started){return;}this._started=true;_2.forEach(this.getChildren(),function(obj){if(!obj._started&&!obj._destroyed&&_f.isFunction(obj.startup)){obj.startup();obj._started=true;}});},destroyRecursive:function(_2c){this._beingDestroyed=true;this.destroyDescendants(_2c);this.destroy(_2c);},destroy:function(_2d){this._beingDestroyed=true;this.uninitialize();function _2e(w){if(w.destroyRecursive){w.destroyRecursive(_2d);}else{if(w.destroy){w.destroy(_2d);}}};_2.forEach(this._connects,_f.hitch(this,"disconnect"));_2.forEach(this._supportingWidgets,_2e);if(this.domNode){_2.forEach(_15.findWidgets(this.domNode,this.containerNode),_2e);}this.destroyRendering(_2d);_15.remove(this.id);this._destro
|