From f0cfe83e3725f9a3928da97a6e3085e79cb25309 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 18 Mar 2013 10:26:24 +0400 Subject: upgrade dojo to 1.8.3 (refs #570) --- lib/dojo/parser.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/dojo/parser.js') diff --git a/lib/dojo/parser.js b/lib/dojo/parser.js index a8c5428ba..347b24a8b 100644 --- a/lib/dojo/parser.js +++ b/lib/dojo/parser.js @@ -1,8 +1,8 @@ /* - Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. + Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ //>>built -define("dojo/parser",["./_base/kernel","./_base/lang","./_base/array","./_base/html","./_base/window","./_base/url","./_base/json","./aspect","./date/stamp","./query","./on","./ready"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b){new Date("X");var _c={"dom-attributes-explicit":document.createElement("div").attributes.length<40};function _d(_e){return _c[_e];};_1.parser=new function(){var _f={};function _10(_11){var map={};for(var _12 in _11){if(_12.charAt(0)=="_"){continue;}map[_12.toLowerCase()]=_12;}return map;};_8.after(_2,"extend",function(){_f={};},true);var _13={};this._functionFromScript=function(_14,_15){var _16="";var _17="";var _18=(_14.getAttribute(_15+"args")||_14.getAttribute("args"));if(_18){_3.forEach(_18.split(/\s*,\s*/),function(_19,idx){_16+="var "+_19+" = arguments["+idx+"]; ";});}var _1a=_14.getAttribute("with");if(_1a&&_1a.length){_3.forEach(_1a.split(/\s*,\s*/),function(_1b){_16+="with("+_1b+"){";_17+="}";});}return new Function(_16+_14.innerHTML+_17);};this.instantiate=function(_1c,_1d,_1e){var _1f=[],_1d=_1d||{};_1e=_1e||{};var _20=(_1e.scope||_1._scopeName)+"Type",_21="data-"+(_1e.scope||_1._scopeName)+"-",_22=_21+"type",_23=_21+"props",_24=_21+"attach-point",_25=_21+"attach-event",_26=_21+"id";var _27={};_3.forEach([_23,_22,_20,_26,"jsId",_24,_25,"dojoAttachPoint","dojoAttachEvent","class","style"],function(_28){_27[_28.toLowerCase()]=_28.replace(_1e.scope,"dojo");});_3.forEach(_1c,function(obj){if(!obj){return;}var _29=obj.node||obj,_2a=_20 in _1d?_1d[_20]:obj.node?obj.type:(_29.getAttribute(_22)||_29.getAttribute(_20)),_2b=_13[_2a]||(_13[_2a]=_2.getObject(_2a)),_2c=_2b&&_2b.prototype;if(!_2b){throw new Error("Could not load class '"+_2a);}var _2d={};if(_1e.defaults){_2.mixin(_2d,_1e.defaults);}if(obj.inherited){_2.mixin(_2d,obj.inherited);}var _2e;if(_d("dom-attributes-explicit")){_2e=_29.attributes;}else{var _2f=/^input$|^img$/i.test(_29.nodeName)?_29:_29.cloneNode(false),_30=_2f.outerHTML.replace(/=[^\s"']+|="[^"]*"|='[^']*'/g,"").replace(/^\s*<[a-zA-Z0-9]*/,"").replace(/>.*$/,"");_2e=_3.map(_30.split(/\s+/),function(_31){var _32=_31.toLowerCase();return {name:_31,value:(_29.nodeName=="LI"&&_31=="value")||_32=="enctype"?_29.getAttribute(_32):_29.getAttributeNode(_32).value,specified:true};});}var i=0,_33;while(_33=_2e[i++]){if(!_33||!_33.specified){continue;}var _34=_33.name,_35=_34.toLowerCase(),_36=_33.value;if(_35 in _27){switch(_27[_35]){case "data-dojo-props":var _37=_36;break;case "data-dojo-id":case "jsId":var _38=_36;break;case "data-dojo-attach-point":case "dojoAttachPoint":_2d.dojoAttachPoint=_36;break;case "data-dojo-attach-event":case "dojoAttachEvent":_2d.dojoAttachEvent=_36;break;case "class":_2d["class"]=_29.className;break;case "style":_2d["style"]=_29.style&&_29.style.cssText;break;}}else{if(!(_34 in _2c)){var map=(_f[_2a]||(_f[_2a]=_10(_2c)));_34=map[_35]||_34;}if(_34 in _2c){switch(typeof _2c[_34]){case "string":_2d[_34]=_36;break;case "number":_2d[_34]=_36.length?Number(_36):NaN;break;case "boolean":_2d[_34]=_36.toLowerCase()!="false";break;case "function":if(_36===""||_36.search(/[^\w\.]+/i)!=-1){_2d[_34]=new Function(_36);}else{_2d[_34]=_2.getObject(_36,false)||new Function(_36);}break;default:var _39=_2c[_34];_2d[_34]=(_39&&"length" in _39)?(_36?_36.split(/\s*,\s*/):[]):(_39 instanceof Date)?(_36==""?new Date(""):_36=="now"?new Date():_9.fromISOString(_36)):(_39 instanceof _1._Url)?(_1.baseUrl+_36):_7.fromJson(_36);}}else{_2d[_34]=_36;}}}if(_37){try{_37=_7.fromJson.call(_1e.propsThis,"{"+_37+"}");_2.mixin(_2d,_37);}catch(e){throw new Error(e.toString()+" in data-dojo-props='"+_37+"'");}}_2.mixin(_2d,_1d);var _3a=obj.node?obj.scripts:(_2b&&(_2b._noScript||_2c._noScript)?[]:_a("> script[type^='dojo/']",_29));var _3b=[],_3c=[],_3d=[],on=[];if(_3a){for(i=0;i<_3a.length;i++){var _3e=_3a[i];_29.removeChild(_3e);var _3f=(_3e.getAttribute(_21+"event")||_3e.getAttribute("event")),_40=_3e.getAttribute(_21+"prop"),_2a=_3e.getAttribute("type"),nf=this._functionFromScript(_3e,_21);if(_3f){if(_2a=="dojo/connect"){_3b.push({event:_3f,func:nf});}else{if(_2a=="dojo/on"){on.push({event:_3f,func:nf});}else{_2d[_3f]=nf;}}}else{if(_2a=="dojo/watch"){_3d.push({prop:_40,func:nf});}else{_3c.push(nf);}}}}var _41=_2b.markupFactory||_2c.markupFactory;var _42=_41?_41(_2d,_29,_2b):new _2b(_2d,_29);_1f.push(_42);if(_38){_2.setObject(_38,_42);}for(i=0;i<_3b.length;i++){_8.after(_42,_3b[i].event,_1.hitch(_42,_3b[i].func),true);}for(i=0;i<_3c.length;i++){_3c[i].call(_42);}for(i=0;i<_3d.length;i++){_42.watch(_3d[i].prop,_3d[i].func);}for(i=0;i.*$/,"");_3e=_4.map(_40.split(/\s+/),function(_41){var _42=_41.toLowerCase();return {name:_41,value:(_37.nodeName=="LI"&&_41=="value")||_42=="enctype"?_37.getAttribute(_42):_37.getAttributeNode(_42).value};});}}var _43=_39.scope||_2._scopeName,_44="data-"+_43+"-",_45={};if(_43!=="dojo"){_45[_44+"props"]="data-dojo-props";_45[_44+"type"]="data-dojo-type";_45[_44+"mixins"]="data-dojo-mixins";_45[_43+"type"]="dojoType";_45[_44+"id"]="data-dojo-id";}var i=0,_46,_47=[],_48,_49;while(_46=_3e[i++]){var _4a=_46.name,_4b=_4a.toLowerCase(),_4c=_46.value;switch(_45[_4b]||_4b){case "data-dojo-type":case "dojotype":case "data-dojo-mixins":break;case "data-dojo-props":_49=_4c;break;case "data-dojo-id":case "jsid":_48=_4c;break;case "data-dojo-attach-point":case "dojoattachpoint":_3d.dojoAttachPoint=_4c;break;case "data-dojo-attach-event":case "dojoattachevent":_3d.dojoAttachEvent=_4c;break;case "class":_3d["class"]=_37.className;break;case "style":_3d["style"]=_37.style&&_37.style.cssText;break;default:if(!(_4a in _3c)){var map=_12(_36);_4a=map[_4b]||_4a;}if(_4a in _3c){switch(typeof _3c[_4a]){case "string":_3d[_4a]=_4c;break;case "number":_3d[_4a]=_4c.length?Number(_4c):NaN;break;case "boolean":_3d[_4a]=_4c.toLowerCase()!="false";break;case "function":if(_4c===""||_4c.search(/[^\w\.]+/i)!=-1){_3d[_4a]=new Function(_4c);}else{_3d[_4a]=_3.getObject(_4c,false)||new Function(_4c);}_47.push(_4a);break;default:var _4d=_3c[_4a];_3d[_4a]=(_4d&&"length" in _4d)?(_4c?_4c.split(/\s*,\s*/):[]):(_4d instanceof Date)?(_4c==""?new Date(""):_4c=="now"?new Date():_b.fromISOString(_4c)):(_4d instanceof _8)?(_2.baseUrl+_4c):_9.fromJson(_4c);}}else{_3d[_4a]=_4c;}}}for(var j=0;j<_47.length;j++){var _4e=_47[j].toLowerCase();_37.removeAttribute(_4e);_37[_4e]=null;}if(_49){try{_49=_9.fromJson.call(_39.propsThis,"{"+_49+"}");_3.mixin(_3d,_49);}catch(e){throw new Error(e.toString()+" in data-dojo-props='"+_49+"'");}}_3.mixin(_3d,_38);if(!_3a){_3a=(_36&&(_36._noScript||_3c._noScript)?[]:_e("> script[type^='dojo/']",_37));}var _4f=[],_50=[],_51=[],ons=[];if(_3a){for(i=0;i<_3a.length;i++){var _52=_3a[i];_37.removeChild(_52);var _53=(_52.getAttribute(_44+"event")||_52.getAttribute("event")),_54=_52.getAttribute(_44+"prop"),_55=_52.getAttribute(_44+"method"),_56=_52.getAttribute(_44+"advice"),_57=_52.getAttribute("type"),nf=this._functionFromScript(_52,_44);if(_53){if(_57=="dojo/connect"){_4f.push({method:_53,func:nf});}else{if(_57=="dojo/on"){ons.push({event:_53,func:nf});}else{_3d[_53]=nf;}}}else{if(_57=="dojo/aspect"){_4f.push({method:_55,advice:_56,func:nf});}else{if(_57=="dojo/watch"){_51.push({prop:_54,func:nf});}else{_50.push(nf);}}}}}var _58=_36.markupFactory||_3c.markupFactory;var _59=_58?_58(_3d,_37,_36):new _36(_3d,_37);if(_48){_3.setObject(_48,_59);}for(i=0;i<_4f.length;i++){_a[_4f[i].advice||"after"](_59,_4f[i].method,_3.hitch(_59,_4f[i].func),true);}for(i=0;i<_50.length;i++){_50[i].call(_59);}for(i=0;i<_51.length;i++){_59.watch(_51[i].prop,_51[i].func);}for(i=0;i