summaryrefslogtreecommitdiff
path: root/lib/dijit/_TemplatedMixin.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-18 10:26:24 +0400
committerAndrew Dolgov <[email protected]>2013-03-18 10:26:26 +0400
commitf0cfe83e3725f9a3928da97a6e3085e79cb25309 (patch)
tree4b0af188defaa807c7bc6ff3a101b41c9166c463 /lib/dijit/_TemplatedMixin.js
parent9a2885da170ffd64358b99194095851a2d09c1b6 (diff)
upgrade dojo to 1.8.3 (refs #570)
Diffstat (limited to 'lib/dijit/_TemplatedMixin.js')
-rw-r--r--lib/dijit/_TemplatedMixin.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dijit/_TemplatedMixin.js b/lib/dijit/_TemplatedMixin.js
index 683bb8f20..44282b6b0 100644
--- a/lib/dijit/_TemplatedMixin.js
+++ b/lib/dijit/_TemplatedMixin.js
@@ -1,2 +1,2 @@
//>>built
-define("dijit/_TemplatedMixin",["dojo/_base/lang","dojo/touch","./_WidgetBase","dojo/string","dojo/cache","dojo/_base/array","dojo/_base/declare","dojo/dom-construct","dojo/_base/sniff","dojo/_base/unload","dojo/_base/window"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b){var _c=_7("dijit._TemplatedMixin",null,{templateString:null,templatePath:null,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];this._attachEvents=[];},_stringRepl:function(_d){var _e=this.declaredClass,_f=this;return _4.substitute(_d,this,function(_10,key){if(key.charAt(0)=="!"){_10=_1.getObject(key.substr(1),false,_f);}if(typeof _10=="undefined"){throw new Error(_e+" template:"+key);}if(_10==null){return "";}return key.charAt(0)=="!"?_10:_10.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){if(!this.templateString){this.templateString=_5(this.templatePath,{sanitize:true});}var _11=_c.getCachedTemplate(this.templateString,this._skipNodeCache);var _12;if(_1.isString(_11)){_12=_8.toDom(this._stringRepl(_11));if(_12.nodeType!=1){throw new Error("Invalid template: "+_11);}}else{_12=_11.cloneNode(true);}this.domNode=_12;this.inherited(arguments);this._attachTemplateNodes(_12,function(n,p){return n.getAttribute(p);});this._beforeFillContent();this._fillContent(this.srcNodeRef);},_beforeFillContent:function(){},_fillContent:function(_13){var _14=this.containerNode;if(_13&&_14){while(_13.hasChildNodes()){_14.appendChild(_13.firstChild);}}},_attachTemplateNodes:function(_15,_16){var _17=_1.isArray(_15)?_15:(_15.all||_15.getElementsByTagName("*"));var x=_1.isArray(_15)?0:-1;for(;x<_17.length;x++){var _18=(x==-1)?_15:_17[x];if(this.widgetsInTemplate&&(_16(_18,"dojoType")||_16(_18,"data-dojo-type"))){continue;}var _19=_16(_18,"dojoAttachPoint")||_16(_18,"data-dojo-attach-point");if(_19){var _1a,_1b=_19.split(/\s*,\s*/);while((_1a=_1b.shift())){if(_1.isArray(this[_1a])){this[_1a].push(_18);}else{this[_1a]=_18;}this._attachPoints.push(_1a);}}var _1c=_16(_18,"dojoAttachEvent")||_16(_18,"data-dojo-attach-event");if(_1c){var _1d,_1e=_1c.split(/\s*,\s*/);var _1f=_1.trim;while((_1d=_1e.shift())){if(_1d){var _20=null;if(_1d.indexOf(":")!=-1){var _21=_1d.split(":");_1d=_1f(_21[0]);_20=_1f(_21[1]);}else{_1d=_1f(_1d);}if(!_20){_20=_1d;}this._attachEvents.push(this.connect(_18,_2[_1d]||_1d,_20));}}}}},destroyRendering:function(){_6.forEach(this._attachPoints,function(_22){delete this[_22];},this);this._attachPoints=[];_6.forEach(this._attachEvents,this.disconnect,this);this._attachEvents=[];this.inherited(arguments);}});_c._templateCache={};_c.getCachedTemplate=function(_23,_24){var _25=_c._templateCache;var key=_23;var _26=_25[key];if(_26){try{if(!_26.ownerDocument||_26.ownerDocument==_b.doc){return _26;}}catch(e){}_8.destroy(_26);}_23=_4.trim(_23);if(_24||_23.match(/\$\{([^\}]+)\}/g)){return (_25[key]=_23);}else{var _27=_8.toDom(_23);if(_27.nodeType!=1){throw new Error("Invalid template: "+_23);}return (_25[key]=_27);}};if(_9("ie")){_a.addOnWindowUnload(function(){var _28=_c._templateCache;for(var key in _28){var _29=_28[key];if(typeof _29=="object"){_8.destroy(_29);}delete _28[key];}});}_1.extend(_3,{dojoAttachEvent:"",dojoAttachPoint:""});return _c;}); \ No newline at end of file
+define("dijit/_TemplatedMixin",["dojo/_base/lang","dojo/touch","./_WidgetBase","dojo/string","dojo/cache","dojo/_base/array","dojo/_base/declare","dojo/dom-construct","dojo/sniff","dojo/_base/unload"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a){var _b=_7("dijit._TemplatedMixin",null,{templateString:null,templatePath:null,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];this._attachEvents=[];},_stringRepl:function(_c){var _d=this.declaredClass,_e=this;return _4.substitute(_c,this,function(_f,key){if(key.charAt(0)=="!"){_f=_1.getObject(key.substr(1),false,_e);}if(typeof _f=="undefined"){throw new Error(_d+" template:"+key);}if(_f==null){return "";}return key.charAt(0)=="!"?_f:_f.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){if(!this.templateString){this.templateString=_5(this.templatePath,{sanitize:true});}var _10=_b.getCachedTemplate(this.templateString,this._skipNodeCache,this.ownerDocument);var _11;if(_1.isString(_10)){_11=_8.toDom(this._stringRepl(_10),this.ownerDocument);if(_11.nodeType!=1){throw new Error("Invalid template: "+_10);}}else{_11=_10.cloneNode(true);}this.domNode=_11;this.inherited(arguments);this._attachTemplateNodes(_11,function(n,p){return n.getAttribute(p);});this._beforeFillContent();this._fillContent(this.srcNodeRef);},_beforeFillContent:function(){},_fillContent:function(_12){var _13=this.containerNode;if(_12&&_13){while(_12.hasChildNodes()){_13.appendChild(_12.firstChild);}}},_attachTemplateNodes:function(_14,_15){var _16=_1.isArray(_14)?_14:(_14.all||_14.getElementsByTagName("*"));var x=_1.isArray(_14)?0:-1;for(;x<0||_16[x];x++){var _17=(x==-1)?_14:_16[x];if(this.widgetsInTemplate&&(_15(_17,"dojoType")||_15(_17,"data-dojo-type"))){continue;}var _18=_15(_17,"dojoAttachPoint")||_15(_17,"data-dojo-attach-point");if(_18){var _19,_1a=_18.split(/\s*,\s*/);while((_19=_1a.shift())){if(_1.isArray(this[_19])){this[_19].push(_17);}else{this[_19]=_17;}this._attachPoints.push(_19);}}var _1b=_15(_17,"dojoAttachEvent")||_15(_17,"data-dojo-attach-event");if(_1b){var _1c,_1d=_1b.split(/\s*,\s*/);var _1e=_1.trim;while((_1c=_1d.shift())){if(_1c){var _1f=null;if(_1c.indexOf(":")!=-1){var _20=_1c.split(":");_1c=_1e(_20[0]);_1f=_1e(_20[1]);}else{_1c=_1e(_1c);}if(!_1f){_1f=_1c;}this._attachEvents.push(this.connect(_17,_2[_1c]||_1c,_1f));}}}}},destroyRendering:function(){_6.forEach(this._attachPoints,function(_21){delete this[_21];},this);this._attachPoints=[];_6.forEach(this._attachEvents,this.disconnect,this);this._attachEvents=[];this.inherited(arguments);}});_b._templateCache={};_b.getCachedTemplate=function(_22,_23,doc){var _24=_b._templateCache;var key=_22;var _25=_24[key];if(_25){try{if(!_25.ownerDocument||_25.ownerDocument==(doc||document)){return _25;}}catch(e){}_8.destroy(_25);}_22=_4.trim(_22);if(_23||_22.match(/\$\{([^\}]+)\}/g)){return (_24[key]=_22);}else{var _26=_8.toDom(_22,doc);if(_26.nodeType!=1){throw new Error("Invalid template: "+_22);}return (_24[key]=_26);}};if(_9("ie")){_a.addOnWindowUnload(function(){var _27=_b._templateCache;for(var key in _27){var _28=_27[key];if(typeof _28=="object"){_8.destroy(_28);}delete _27[key];}});}_1.extend(_3,{dojoAttachEvent:"",dojoAttachPoint:""});return _b;}); \ No newline at end of file