mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-28 21:21:27 +00:00
add dijit/dojo stuff; initial ui mockup
This commit is contained in:
102
lib/dojo/_base/Color.js
Normal file
102
lib/dojo/_base/Color.js
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base.Color"]){
|
||||
dojo._hasResource["dojo._base.Color"]=true;
|
||||
dojo.provide("dojo._base.Color");
|
||||
dojo.require("dojo._base.array");
|
||||
dojo.require("dojo._base.lang");
|
||||
(function(){
|
||||
var d=dojo;
|
||||
dojo.Color=function(_1){
|
||||
if(_1){
|
||||
this.setColor(_1);
|
||||
}
|
||||
};
|
||||
dojo.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:d.config.transparentColor||[255,255,255]};
|
||||
dojo.extend(dojo.Color,{r:255,g:255,b:255,a:1,_set:function(r,g,b,a){
|
||||
var t=this;
|
||||
t.r=r;
|
||||
t.g=g;
|
||||
t.b=b;
|
||||
t.a=a;
|
||||
},setColor:function(_2){
|
||||
if(d.isString(_2)){
|
||||
d.colorFromString(_2,this);
|
||||
}else{
|
||||
if(d.isArray(_2)){
|
||||
d.colorFromArray(_2,this);
|
||||
}else{
|
||||
this._set(_2.r,_2.g,_2.b,_2.a);
|
||||
if(!(_2 instanceof d.Color)){
|
||||
this.sanitize();
|
||||
}
|
||||
}
|
||||
}
|
||||
return this;
|
||||
},sanitize:function(){
|
||||
return this;
|
||||
},toRgb:function(){
|
||||
var t=this;
|
||||
return [t.r,t.g,t.b];
|
||||
},toRgba:function(){
|
||||
var t=this;
|
||||
return [t.r,t.g,t.b,t.a];
|
||||
},toHex:function(){
|
||||
var _3=d.map(["r","g","b"],function(x){
|
||||
var s=this[x].toString(16);
|
||||
return s.length<2?"0"+s:s;
|
||||
},this);
|
||||
return "#"+_3.join("");
|
||||
},toCss:function(_4){
|
||||
var t=this,_5=t.r+", "+t.g+", "+t.b;
|
||||
return (_4?"rgba("+_5+", "+t.a:"rgb("+_5)+")";
|
||||
},toString:function(){
|
||||
return this.toCss(true);
|
||||
}});
|
||||
dojo.blendColors=function(_6,_7,_8,_9){
|
||||
var t=_9||new d.Color();
|
||||
d.forEach(["r","g","b","a"],function(x){
|
||||
t[x]=_6[x]+(_7[x]-_6[x])*_8;
|
||||
if(x!="a"){
|
||||
t[x]=Math.round(t[x]);
|
||||
}
|
||||
});
|
||||
return t.sanitize();
|
||||
};
|
||||
dojo.colorFromRgb=function(_a,_b){
|
||||
var m=_a.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);
|
||||
return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),_b);
|
||||
};
|
||||
dojo.colorFromHex=function(_c,_d){
|
||||
var t=_d||new d.Color(),_e=(_c.length==4)?4:8,_f=(1<<_e)-1;
|
||||
_c=Number("0x"+_c.substr(1));
|
||||
if(isNaN(_c)){
|
||||
return null;
|
||||
}
|
||||
d.forEach(["b","g","r"],function(x){
|
||||
var c=_c&_f;
|
||||
_c>>=_e;
|
||||
t[x]=_e==4?17*c:c;
|
||||
});
|
||||
t.a=1;
|
||||
return t;
|
||||
};
|
||||
dojo.colorFromArray=function(a,obj){
|
||||
var t=obj||new d.Color();
|
||||
t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));
|
||||
if(isNaN(t.a)){
|
||||
t.a=1;
|
||||
}
|
||||
return t.sanitize();
|
||||
};
|
||||
dojo.colorFromString=function(str,obj){
|
||||
var a=d.Color.named[str];
|
||||
return a&&d.colorFromArray(a,obj)||d.colorFromRgb(str,obj)||d.colorFromHex(str,obj);
|
||||
};
|
||||
})();
|
||||
}
|
||||
130
lib/dojo/_base/Deferred.js
Normal file
130
lib/dojo/_base/Deferred.js
Normal file
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base.Deferred"]){
|
||||
dojo._hasResource["dojo._base.Deferred"]=true;
|
||||
dojo.provide("dojo._base.Deferred");
|
||||
dojo.require("dojo._base.lang");
|
||||
(function(){
|
||||
var _1=function(){
|
||||
};
|
||||
var _2=Object.freeze||function(){
|
||||
};
|
||||
dojo.Deferred=function(_3){
|
||||
var _4,_5,_6,_7,_8;
|
||||
var _9=this.promise={};
|
||||
function _a(_b){
|
||||
if(_5){
|
||||
throw new Error("This deferred has already been resolved");
|
||||
}
|
||||
_4=_b;
|
||||
_5=true;
|
||||
_c();
|
||||
};
|
||||
function _c(){
|
||||
var _d;
|
||||
while(!_d&&_8){
|
||||
var _e=_8;
|
||||
_8=_8.next;
|
||||
if(_d=(_e.progress==_1)){
|
||||
_5=false;
|
||||
}
|
||||
var _f=(_6?_e.error:_e.resolved);
|
||||
if(_f){
|
||||
try{
|
||||
var _10=_f(_4);
|
||||
if(_10&&typeof _10.then==="function"){
|
||||
_10.then(dojo.hitch(_e.deferred,"resolve"),dojo.hitch(_e.deferred,"reject"));
|
||||
continue;
|
||||
}
|
||||
var _11=_d&&_10===undefined;
|
||||
_e.deferred[_11&&_6?"reject":"resolve"](_11?_4:_10);
|
||||
}
|
||||
catch(e){
|
||||
_e.deferred.reject(e);
|
||||
}
|
||||
}else{
|
||||
if(_6){
|
||||
_e.deferred.reject(_4);
|
||||
}else{
|
||||
_e.deferred.resolve(_4);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
this.resolve=this.callback=function(_12){
|
||||
this.fired=0;
|
||||
this.results=[_12,null];
|
||||
_a(_12);
|
||||
};
|
||||
this.reject=this.errback=function(_13){
|
||||
_6=true;
|
||||
this.fired=1;
|
||||
_a(_13);
|
||||
this.results=[null,_13];
|
||||
if(!_13||_13.log!==false){
|
||||
(dojo.config.deferredOnError||function(x){
|
||||
console.error(x);
|
||||
})(_13);
|
||||
}
|
||||
};
|
||||
this.progress=function(_14){
|
||||
var _15=_8;
|
||||
while(_15){
|
||||
var _16=_15.progress;
|
||||
_16&&_16(_14);
|
||||
_15=_15.next;
|
||||
}
|
||||
};
|
||||
this.addCallbacks=function(_17,_18){
|
||||
this.then(_17,_18,_1);
|
||||
return this;
|
||||
};
|
||||
this.then=_9.then=function(_19,_1a,_1b){
|
||||
var _1c=_1b==_1?this:new dojo.Deferred(_9.cancel);
|
||||
var _1d={resolved:_19,error:_1a,progress:_1b,deferred:_1c};
|
||||
if(_8){
|
||||
_7=_7.next=_1d;
|
||||
}else{
|
||||
_8=_7=_1d;
|
||||
}
|
||||
if(_5){
|
||||
_c();
|
||||
}
|
||||
return _1c.promise;
|
||||
};
|
||||
var _1e=this;
|
||||
this.cancel=_9.cancel=function(){
|
||||
if(!_5){
|
||||
var _1f=_3&&_3(_1e);
|
||||
if(!_5){
|
||||
if(!(_1f instanceof Error)){
|
||||
_1f=new Error(_1f);
|
||||
}
|
||||
_1f.log=false;
|
||||
_1e.reject(_1f);
|
||||
}
|
||||
}
|
||||
};
|
||||
_2(_9);
|
||||
};
|
||||
dojo.extend(dojo.Deferred,{addCallback:function(_20){
|
||||
return this.addCallbacks(dojo.hitch.apply(dojo,arguments));
|
||||
},addErrback:function(_21){
|
||||
return this.addCallbacks(null,dojo.hitch.apply(dojo,arguments));
|
||||
},addBoth:function(_22){
|
||||
var _23=dojo.hitch.apply(dojo,arguments);
|
||||
return this.addCallbacks(_23,_23);
|
||||
},fired:-1});
|
||||
})();
|
||||
dojo.when=function(_24,_25,_26,_27){
|
||||
if(_24&&typeof _24.then==="function"){
|
||||
return _24.then(_25,_26,_27);
|
||||
}
|
||||
return _25(_24);
|
||||
};
|
||||
}
|
||||
232
lib/dojo/_base/NodeList.js
Normal file
232
lib/dojo/_base/NodeList.js
Normal file
@@ -0,0 +1,232 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base.NodeList"]){
|
||||
dojo._hasResource["dojo._base.NodeList"]=true;
|
||||
dojo.provide("dojo._base.NodeList");
|
||||
dojo.require("dojo._base.lang");
|
||||
dojo.require("dojo._base.array");
|
||||
(function(){
|
||||
var d=dojo;
|
||||
var ap=Array.prototype,_1=ap.slice,_2=ap.concat;
|
||||
var _3=function(a,_4,_5){
|
||||
if(!a.sort){
|
||||
a=_1.call(a,0);
|
||||
}
|
||||
var _6=_5||this._NodeListCtor||d._NodeListCtor;
|
||||
a.constructor=_6;
|
||||
dojo._mixin(a,_6.prototype);
|
||||
a._NodeListCtor=_6;
|
||||
return _4?a._stash(_4):a;
|
||||
};
|
||||
var _7=function(f,a,o){
|
||||
a=[0].concat(_1.call(a,0));
|
||||
o=o||d.global;
|
||||
return function(_8){
|
||||
a[0]=_8;
|
||||
return f.apply(o,a);
|
||||
};
|
||||
};
|
||||
var _9=function(f,o){
|
||||
return function(){
|
||||
this.forEach(_7(f,arguments,o));
|
||||
return this;
|
||||
};
|
||||
};
|
||||
var _a=function(f,o){
|
||||
return function(){
|
||||
return this.map(_7(f,arguments,o));
|
||||
};
|
||||
};
|
||||
var _b=function(f,o){
|
||||
return function(){
|
||||
return this.filter(_7(f,arguments,o));
|
||||
};
|
||||
};
|
||||
var _c=function(f,g,o){
|
||||
return function(){
|
||||
var a=arguments,_d=_7(f,a,o);
|
||||
if(g.call(o||d.global,a)){
|
||||
return this.map(_d);
|
||||
}
|
||||
this.forEach(_d);
|
||||
return this;
|
||||
};
|
||||
};
|
||||
var _e=function(a){
|
||||
return a.length==1&&(typeof a[0]=="string");
|
||||
};
|
||||
var _f=function(_10){
|
||||
var p=_10.parentNode;
|
||||
if(p){
|
||||
p.removeChild(_10);
|
||||
}
|
||||
};
|
||||
dojo.NodeList=function(){
|
||||
return _3(Array.apply(null,arguments));
|
||||
};
|
||||
d._NodeListCtor=d.NodeList;
|
||||
var nl=d.NodeList,nlp=nl.prototype;
|
||||
nl._wrap=nlp._wrap=_3;
|
||||
nl._adaptAsMap=_a;
|
||||
nl._adaptAsForEach=_9;
|
||||
nl._adaptAsFilter=_b;
|
||||
nl._adaptWithCondition=_c;
|
||||
d.forEach(["slice","splice"],function(_11){
|
||||
var f=ap[_11];
|
||||
nlp[_11]=function(){
|
||||
return this._wrap(f.apply(this,arguments),_11=="slice"?this:null);
|
||||
};
|
||||
});
|
||||
d.forEach(["indexOf","lastIndexOf","every","some"],function(_12){
|
||||
var f=d[_12];
|
||||
nlp[_12]=function(){
|
||||
return f.apply(d,[this].concat(_1.call(arguments,0)));
|
||||
};
|
||||
});
|
||||
d.forEach(["attr","style"],function(_13){
|
||||
nlp[_13]=_c(d[_13],_e);
|
||||
});
|
||||
d.forEach(["connect","addClass","removeClass","toggleClass","empty","removeAttr"],function(_14){
|
||||
nlp[_14]=_9(d[_14]);
|
||||
});
|
||||
dojo.extend(dojo.NodeList,{_normalize:function(_15,_16){
|
||||
var _17=_15.parse===true?true:false;
|
||||
if(typeof _15.template=="string"){
|
||||
var _18=_15.templateFunc||(dojo.string&&dojo.string.substitute);
|
||||
_15=_18?_18(_15.template,_15):_15;
|
||||
}
|
||||
var _19=(typeof _15);
|
||||
if(_19=="string"||_19=="number"){
|
||||
_15=dojo._toDom(_15,(_16&&_16.ownerDocument));
|
||||
if(_15.nodeType==11){
|
||||
_15=dojo._toArray(_15.childNodes);
|
||||
}else{
|
||||
_15=[_15];
|
||||
}
|
||||
}else{
|
||||
if(!dojo.isArrayLike(_15)){
|
||||
_15=[_15];
|
||||
}else{
|
||||
if(!dojo.isArray(_15)){
|
||||
_15=dojo._toArray(_15);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_17){
|
||||
_15._runParse=true;
|
||||
}
|
||||
return _15;
|
||||
},_cloneNode:function(_1a){
|
||||
return _1a.cloneNode(true);
|
||||
},_place:function(ary,_1b,_1c,_1d){
|
||||
if(_1b.nodeType!=1&&_1c=="only"){
|
||||
return;
|
||||
}
|
||||
var _1e=_1b,_1f;
|
||||
var _20=ary.length;
|
||||
for(var i=_20-1;i>=0;i--){
|
||||
var _21=(_1d?this._cloneNode(ary[i]):ary[i]);
|
||||
if(ary._runParse&&dojo.parser&&dojo.parser.parse){
|
||||
if(!_1f){
|
||||
_1f=_1e.ownerDocument.createElement("div");
|
||||
}
|
||||
_1f.appendChild(_21);
|
||||
dojo.parser.parse(_1f);
|
||||
_21=_1f.firstChild;
|
||||
while(_1f.firstChild){
|
||||
_1f.removeChild(_1f.firstChild);
|
||||
}
|
||||
}
|
||||
if(i==_20-1){
|
||||
dojo.place(_21,_1e,_1c);
|
||||
}else{
|
||||
_1e.parentNode.insertBefore(_21,_1e);
|
||||
}
|
||||
_1e=_21;
|
||||
}
|
||||
},_stash:function(_22){
|
||||
this._parent=_22;
|
||||
return this;
|
||||
},end:function(){
|
||||
if(this._parent){
|
||||
return this._parent;
|
||||
}else{
|
||||
return new this._NodeListCtor();
|
||||
}
|
||||
},concat:function(_23){
|
||||
var t=d.isArray(this)?this:_1.call(this,0),m=d.map(arguments,function(a){
|
||||
return a&&!d.isArray(a)&&(typeof NodeList!="undefined"&&a.constructor===NodeList||a.constructor===this._NodeListCtor)?_1.call(a,0):a;
|
||||
});
|
||||
return this._wrap(_2.apply(t,m),this);
|
||||
},map:function(_24,obj){
|
||||
return this._wrap(d.map(this,_24,obj),this);
|
||||
},forEach:function(_25,_26){
|
||||
d.forEach(this,_25,_26);
|
||||
return this;
|
||||
},coords:_a(d.coords),position:_a(d.position),place:function(_27,_28){
|
||||
var _29=d.query(_27)[0];
|
||||
return this.forEach(function(_2a){
|
||||
d.place(_2a,_29,_28);
|
||||
});
|
||||
},orphan:function(_2b){
|
||||
return (_2b?d._filterQueryResult(this,_2b):this).forEach(_f);
|
||||
},adopt:function(_2c,_2d){
|
||||
return d.query(_2c).place(this[0],_2d)._stash(this);
|
||||
},query:function(_2e){
|
||||
if(!_2e){
|
||||
return this;
|
||||
}
|
||||
var ret=this.map(function(_2f){
|
||||
return d.query(_2e,_2f).filter(function(_30){
|
||||
return _30!==undefined;
|
||||
});
|
||||
});
|
||||
return this._wrap(_2.apply([],ret),this);
|
||||
},filter:function(_31){
|
||||
var a=arguments,_32=this,_33=0;
|
||||
if(typeof _31=="string"){
|
||||
_32=d._filterQueryResult(this,a[0]);
|
||||
if(a.length==1){
|
||||
return _32._stash(this);
|
||||
}
|
||||
_33=1;
|
||||
}
|
||||
return this._wrap(d.filter(_32,a[_33],a[_33+1]),this);
|
||||
},addContent:function(_34,_35){
|
||||
_34=this._normalize(_34,this[0]);
|
||||
for(var i=0,_36;_36=this[i];i++){
|
||||
this._place(_34,_36,_35,i>0);
|
||||
}
|
||||
return this;
|
||||
},instantiate:function(_37,_38){
|
||||
var c=d.isFunction(_37)?_37:d.getObject(_37);
|
||||
_38=_38||{};
|
||||
return this.forEach(function(_39){
|
||||
new c(_38,_39);
|
||||
});
|
||||
},at:function(){
|
||||
var t=new this._NodeListCtor();
|
||||
d.forEach(arguments,function(i){
|
||||
if(i<0){
|
||||
i=this.length+i;
|
||||
}
|
||||
if(this[i]){
|
||||
t.push(this[i]);
|
||||
}
|
||||
},this);
|
||||
return t._stash(this);
|
||||
}});
|
||||
nl.events=["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","submit"];
|
||||
d.forEach(nl.events,function(evt){
|
||||
var _3a="on"+evt;
|
||||
nlp[_3a]=function(a,b){
|
||||
return this.connect(_3a,a,b);
|
||||
};
|
||||
});
|
||||
})();
|
||||
}
|
||||
120
lib/dojo/_base/_loader/bootstrap.js
vendored
Normal file
120
lib/dojo/_base/_loader/bootstrap.js
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
(function(){
|
||||
if(typeof this["loadFirebugConsole"]=="function"){
|
||||
this["loadFirebugConsole"]();
|
||||
}else{
|
||||
this.console=this.console||{};
|
||||
var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];
|
||||
var i=0,tn;
|
||||
while((tn=cn[i++])){
|
||||
if(!console[tn]){
|
||||
(function(){
|
||||
var _1=tn+"";
|
||||
console[_1]=("log" in console)?function(){
|
||||
var a=Array.apply({},arguments);
|
||||
a.unshift(_1+":");
|
||||
console["log"](a.join(" "));
|
||||
}:function(){
|
||||
};
|
||||
console[_1]._fake=true;
|
||||
})();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(typeof dojo=="undefined"){
|
||||
dojo={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};
|
||||
}
|
||||
var d=dojo;
|
||||
if(typeof dijit=="undefined"){
|
||||
dijit={_scopeName:"dijit"};
|
||||
}
|
||||
if(typeof dojox=="undefined"){
|
||||
dojox={_scopeName:"dojox"};
|
||||
}
|
||||
if(!d._scopeArgs){
|
||||
d._scopeArgs=[dojo,dijit,dojox];
|
||||
}
|
||||
d.global=this;
|
||||
d.config={isDebug:false,debugAtAllCosts:false};
|
||||
if(typeof djConfig!="undefined"){
|
||||
for(var _2 in djConfig){
|
||||
d.config[_2]=djConfig[_2];
|
||||
}
|
||||
}
|
||||
dojo.locale=d.config.locale;
|
||||
var _3="$Rev: 22487 $".match(/\d+/);
|
||||
dojo.version={major:1,minor:5,patch:0,flag:"",revision:_3?+_3[0]:NaN,toString:function(){
|
||||
with(d.version){
|
||||
return major+"."+minor+"."+patch+flag+" ("+revision+")";
|
||||
}
|
||||
}};
|
||||
if(typeof OpenAjax!="undefined"){
|
||||
OpenAjax.hub.registerLibrary(dojo._scopeName,"http://dojotoolkit.org",d.version.toString());
|
||||
}
|
||||
var _4,_5,_6={};
|
||||
for(var i in {toString:1}){
|
||||
_4=[];
|
||||
break;
|
||||
}
|
||||
dojo._extraNames=_4=_4||["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];
|
||||
_5=_4.length;
|
||||
dojo._mixin=function(_7,_8){
|
||||
var _9,s,i;
|
||||
for(_9 in _8){
|
||||
s=_8[_9];
|
||||
if(!(_9 in _7)||(_7[_9]!==s&&(!(_9 in _6)||_6[_9]!==s))){
|
||||
_7[_9]=s;
|
||||
}
|
||||
}
|
||||
if(_5&&_8){
|
||||
for(i=0;i<_5;++i){
|
||||
_9=_4[i];
|
||||
s=_8[_9];
|
||||
if(!(_9 in _7)||(_7[_9]!==s&&(!(_9 in _6)||_6[_9]!==s))){
|
||||
_7[_9]=s;
|
||||
}
|
||||
}
|
||||
}
|
||||
return _7;
|
||||
};
|
||||
dojo.mixin=function(_a,_b){
|
||||
if(!_a){
|
||||
_a={};
|
||||
}
|
||||
for(var i=1,l=arguments.length;i<l;i++){
|
||||
d._mixin(_a,arguments[i]);
|
||||
}
|
||||
return _a;
|
||||
};
|
||||
dojo._getProp=function(_c,_d,_e){
|
||||
var _f=_e||d.global;
|
||||
for(var i=0,p;_f&&(p=_c[i]);i++){
|
||||
if(i==0&&d._scopeMap[p]){
|
||||
p=d._scopeMap[p];
|
||||
}
|
||||
_f=(p in _f?_f[p]:(_d?_f[p]={}:undefined));
|
||||
}
|
||||
return _f;
|
||||
};
|
||||
dojo.setObject=function(_10,_11,_12){
|
||||
var _13=_10.split("."),p=_13.pop(),obj=d._getProp(_13,true,_12);
|
||||
return obj&&p?(obj[p]=_11):undefined;
|
||||
};
|
||||
dojo.getObject=function(_14,_15,_16){
|
||||
return d._getProp(_14.split("."),_15,_16);
|
||||
};
|
||||
dojo.exists=function(_17,obj){
|
||||
return !!d.getObject(_17,false,obj);
|
||||
};
|
||||
dojo["eval"]=function(_18){
|
||||
return d.global.eval?d.global.eval(_18):eval(_18);
|
||||
};
|
||||
d.deprecated=d.experimental=function(){
|
||||
};
|
||||
})();
|
||||
244
lib/dojo/_base/_loader/hostenv_browser.js
Normal file
244
lib/dojo/_base/_loader/hostenv_browser.js
Normal file
@@ -0,0 +1,244 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(typeof window!="undefined"){
|
||||
dojo.isBrowser=true;
|
||||
dojo._name="browser";
|
||||
(function(){
|
||||
var d=dojo;
|
||||
if(document&&document.getElementsByTagName){
|
||||
var _1=document.getElementsByTagName("script");
|
||||
var _2=/dojo(\.xd)?\.js(\W|$)/i;
|
||||
for(var i=0;i<_1.length;i++){
|
||||
var _3=_1[i].getAttribute("src");
|
||||
if(!_3){
|
||||
continue;
|
||||
}
|
||||
var m=_3.match(_2);
|
||||
if(m){
|
||||
if(!d.config.baseUrl){
|
||||
d.config.baseUrl=_3.substring(0,m.index);
|
||||
}
|
||||
var _4=_1[i].getAttribute("djConfig");
|
||||
if(_4){
|
||||
var _5=eval("({ "+_4+" })");
|
||||
for(var x in _5){
|
||||
dojo.config[x]=_5[x];
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
d.baseUrl=d.config.baseUrl;
|
||||
var n=navigator;
|
||||
var _6=n.userAgent,_7=n.appVersion,tv=parseFloat(_7);
|
||||
if(_6.indexOf("Opera")>=0){
|
||||
d.isOpera=tv;
|
||||
}
|
||||
if(_6.indexOf("AdobeAIR")>=0){
|
||||
d.isAIR=1;
|
||||
}
|
||||
d.isKhtml=(_7.indexOf("Konqueror")>=0)?tv:0;
|
||||
d.isWebKit=parseFloat(_6.split("WebKit/")[1])||undefined;
|
||||
d.isChrome=parseFloat(_6.split("Chrome/")[1])||undefined;
|
||||
d.isMac=_7.indexOf("Macintosh")>=0;
|
||||
var _8=Math.max(_7.indexOf("WebKit"),_7.indexOf("Safari"),0);
|
||||
if(_8&&!dojo.isChrome){
|
||||
d.isSafari=parseFloat(_7.split("Version/")[1]);
|
||||
if(!d.isSafari||parseFloat(_7.substr(_8+7))<=419.3){
|
||||
d.isSafari=2;
|
||||
}
|
||||
}
|
||||
if(_6.indexOf("Gecko")>=0&&!d.isKhtml&&!d.isWebKit){
|
||||
d.isMozilla=d.isMoz=tv;
|
||||
}
|
||||
if(d.isMoz){
|
||||
d.isFF=parseFloat(_6.split("Firefox/")[1]||_6.split("Minefield/")[1])||undefined;
|
||||
}
|
||||
if(document.all&&!d.isOpera){
|
||||
d.isIE=parseFloat(_7.split("MSIE ")[1])||undefined;
|
||||
var _9=document.documentMode;
|
||||
if(_9&&_9!=5&&Math.floor(d.isIE)!=_9){
|
||||
d.isIE=_9;
|
||||
}
|
||||
}
|
||||
if(dojo.isIE&&window.location.protocol==="file:"){
|
||||
dojo.config.ieForceActiveXXhr=true;
|
||||
}
|
||||
d.isQuirks=document.compatMode=="BackCompat";
|
||||
d.locale=dojo.config.locale||(d.isIE?n.userLanguage:n.language).toLowerCase();
|
||||
d._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
|
||||
d._xhrObj=function(){
|
||||
var _a,_b;
|
||||
if(!dojo.isIE||!dojo.config.ieForceActiveXXhr){
|
||||
try{
|
||||
_a=new XMLHttpRequest();
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
}
|
||||
if(!_a){
|
||||
for(var i=0;i<3;++i){
|
||||
var _c=d._XMLHTTP_PROGIDS[i];
|
||||
try{
|
||||
_a=new ActiveXObject(_c);
|
||||
}
|
||||
catch(e){
|
||||
_b=e;
|
||||
}
|
||||
if(_a){
|
||||
d._XMLHTTP_PROGIDS=[_c];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!_a){
|
||||
throw new Error("XMLHTTP not available: "+_b);
|
||||
}
|
||||
return _a;
|
||||
};
|
||||
d._isDocumentOk=function(_d){
|
||||
var _e=_d.status||0,lp=location.protocol;
|
||||
return (_e>=200&&_e<300)||_e==304||_e==1223||(!_e&&(lp=="file:"||lp=="chrome:"||lp=="chrome-extension:"||lp=="app:"));
|
||||
};
|
||||
var _f=window.location+"";
|
||||
var _10=document.getElementsByTagName("base");
|
||||
var _11=(_10&&_10.length>0);
|
||||
d._getText=function(uri,_12){
|
||||
var _13=d._xhrObj();
|
||||
if(!_11&&dojo._Url){
|
||||
uri=(new dojo._Url(_f,uri)).toString();
|
||||
}
|
||||
if(d.config.cacheBust){
|
||||
uri+="";
|
||||
uri+=(uri.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"");
|
||||
}
|
||||
_13.open("GET",uri,false);
|
||||
try{
|
||||
_13.send(null);
|
||||
if(!d._isDocumentOk(_13)){
|
||||
var err=Error("Unable to load "+uri+" status:"+_13.status);
|
||||
err.status=_13.status;
|
||||
err.responseText=_13.responseText;
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
catch(e){
|
||||
if(_12){
|
||||
return null;
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
return _13.responseText;
|
||||
};
|
||||
var _14=window;
|
||||
var _15=function(_16,fp){
|
||||
var _17=_14.attachEvent||_14.addEventListener;
|
||||
_16=_14.attachEvent?_16:_16.substring(2);
|
||||
_17(_16,function(){
|
||||
fp.apply(_14,arguments);
|
||||
},false);
|
||||
};
|
||||
d._windowUnloaders=[];
|
||||
d.windowUnloaded=function(){
|
||||
var mll=d._windowUnloaders;
|
||||
while(mll.length){
|
||||
(mll.pop())();
|
||||
}
|
||||
d=null;
|
||||
};
|
||||
var _18=0;
|
||||
d.addOnWindowUnload=function(obj,_19){
|
||||
d._onto(d._windowUnloaders,obj,_19);
|
||||
if(!_18){
|
||||
_18=1;
|
||||
_15("onunload",d.windowUnloaded);
|
||||
}
|
||||
};
|
||||
var _1a=0;
|
||||
d.addOnUnload=function(obj,_1b){
|
||||
d._onto(d._unloaders,obj,_1b);
|
||||
if(!_1a){
|
||||
_1a=1;
|
||||
_15("onbeforeunload",dojo.unloaded);
|
||||
}
|
||||
};
|
||||
})();
|
||||
dojo._initFired=false;
|
||||
dojo._loadInit=function(e){
|
||||
if(dojo._scrollIntervalId){
|
||||
clearInterval(dojo._scrollIntervalId);
|
||||
dojo._scrollIntervalId=0;
|
||||
}
|
||||
if(!dojo._initFired){
|
||||
dojo._initFired=true;
|
||||
if(!dojo.config.afterOnLoad&&window.detachEvent){
|
||||
window.detachEvent("onload",dojo._loadInit);
|
||||
}
|
||||
if(dojo._inFlightCount==0){
|
||||
dojo._modulesLoaded();
|
||||
}
|
||||
}
|
||||
};
|
||||
if(!dojo.config.afterOnLoad){
|
||||
if(document.addEventListener){
|
||||
document.addEventListener("DOMContentLoaded",dojo._loadInit,false);
|
||||
window.addEventListener("load",dojo._loadInit,false);
|
||||
}else{
|
||||
if(window.attachEvent){
|
||||
window.attachEvent("onload",dojo._loadInit);
|
||||
if(!dojo.config.skipIeDomLoaded&&self===self.top){
|
||||
dojo._scrollIntervalId=setInterval(function(){
|
||||
try{
|
||||
if(document.body){
|
||||
document.documentElement.doScroll("left");
|
||||
dojo._loadInit();
|
||||
}
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
},30);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(dojo.isIE){
|
||||
try{
|
||||
(function(){
|
||||
document.namespaces.add("v","urn:schemas-microsoft-com:vml");
|
||||
var _1c=["*","group","roundrect","oval","shape","rect","imagedata","path","textpath","text"],i=0,l=1,s=document.createStyleSheet();
|
||||
if(dojo.isIE>=8){
|
||||
i=1;
|
||||
l=_1c.length;
|
||||
}
|
||||
for(;i<l;++i){
|
||||
s.addRule("v\\:"+_1c[i],"behavior:url(#default#VML); display:inline-block");
|
||||
}
|
||||
})();
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
}
|
||||
}
|
||||
(function(){
|
||||
var mp=dojo.config["modulePaths"];
|
||||
if(mp){
|
||||
for(var _1d in mp){
|
||||
dojo.registerModulePath(_1d,mp[_1d]);
|
||||
}
|
||||
}
|
||||
})();
|
||||
if(dojo.config.isDebug){
|
||||
dojo.require("dojo._firebug.firebug");
|
||||
}
|
||||
if(dojo.config.debugAtAllCosts){
|
||||
dojo.config.useXDomain=true;
|
||||
dojo.require("dojo._base._loader.loader_xd");
|
||||
dojo.require("dojo._base._loader.loader_debug");
|
||||
dojo.require("dojo.i18n");
|
||||
}
|
||||
175
lib/dojo/_base/_loader/hostenv_ff_ext.js
Normal file
175
lib/dojo/_base/_loader/hostenv_ff_ext.js
Normal file
@@ -0,0 +1,175 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(typeof window!="undefined"){
|
||||
dojo.isBrowser=true;
|
||||
dojo._name="browser";
|
||||
(function(){
|
||||
var d=dojo;
|
||||
d.baseUrl=d.config.baseUrl;
|
||||
var n=navigator;
|
||||
var _1=n.userAgent;
|
||||
var _2=n.appVersion;
|
||||
var tv=parseFloat(_2);
|
||||
d.isMozilla=d.isMoz=tv;
|
||||
if(d.isMoz){
|
||||
d.isFF=parseFloat(_1.split("Firefox/")[1])||undefined;
|
||||
}
|
||||
d.isQuirks=document.compatMode=="BackCompat";
|
||||
d.locale=dojo.config.locale||n.language.toLowerCase();
|
||||
d._xhrObj=function(){
|
||||
return new XMLHttpRequest();
|
||||
};
|
||||
var _3=d._loadUri;
|
||||
d._loadUri=function(_4,cb){
|
||||
var _5=["file:","chrome:","resource:"].some(function(_6){
|
||||
return String(_4).indexOf(_6)==0;
|
||||
});
|
||||
if(_5){
|
||||
var l=Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader);
|
||||
var _7=l.loadSubScript(_4,d.global);
|
||||
if(cb){
|
||||
cb(_7);
|
||||
}
|
||||
return true;
|
||||
}else{
|
||||
return _3.apply(d,arguments);
|
||||
}
|
||||
};
|
||||
d._isDocumentOk=function(_8){
|
||||
var _9=_8.status||0;
|
||||
return (_9>=200&&_9<300)||_9==304||_9==1223||(!_9&&(location.protocol=="file:"||location.protocol=="chrome:"));
|
||||
};
|
||||
var _a=false;
|
||||
d._getText=function(_b,_c){
|
||||
var _d=d._xhrObj();
|
||||
if(!_a&&dojo._Url){
|
||||
_b=(new dojo._Url(_b)).toString();
|
||||
}
|
||||
if(d.config.cacheBust){
|
||||
_b+="";
|
||||
_b+=(_b.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"");
|
||||
}
|
||||
var _e=["file:","chrome:","resource:"].some(function(_f){
|
||||
return String(_b).indexOf(_f)==0;
|
||||
});
|
||||
if(_e){
|
||||
var _10=Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
|
||||
var _11=Components.classes["@mozilla.org/scriptableinputstream;1"].getService(Components.interfaces.nsIScriptableInputStream);
|
||||
var _12=_10.newChannel(_b,null,null);
|
||||
var _13=_12.open();
|
||||
_11.init(_13);
|
||||
var str=_11.read(_13.available());
|
||||
_11.close();
|
||||
_13.close();
|
||||
return str;
|
||||
}else{
|
||||
_d.open("GET",_b,false);
|
||||
try{
|
||||
_d.send(null);
|
||||
if(!d._isDocumentOk(_d)){
|
||||
var err=Error("Unable to load "+_b+" status:"+_d.status);
|
||||
err.status=_d.status;
|
||||
err.responseText=_d.responseText;
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
catch(e){
|
||||
if(_c){
|
||||
return null;
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
return _d.responseText;
|
||||
}
|
||||
};
|
||||
d._windowUnloaders=[];
|
||||
d.windowUnloaded=function(){
|
||||
var mll=d._windowUnloaders;
|
||||
while(mll.length){
|
||||
(mll.pop())();
|
||||
}
|
||||
};
|
||||
d.addOnWindowUnload=function(obj,_14){
|
||||
d._onto(d._windowUnloaders,obj,_14);
|
||||
};
|
||||
var _15=[];
|
||||
var _16=null;
|
||||
dojo._defaultContext=[window,document];
|
||||
dojo.pushContext=function(g,d){
|
||||
var old=[dojo.global,dojo.doc];
|
||||
_15.push(old);
|
||||
var n;
|
||||
if(!g&&!d){
|
||||
n=dojo._defaultContext;
|
||||
}else{
|
||||
n=[g,d];
|
||||
if(!d&&dojo.isString(g)){
|
||||
var t=document.getElementById(g);
|
||||
if(t.contentDocument){
|
||||
n=[t.contentWindow,t.contentDocument];
|
||||
}
|
||||
}
|
||||
}
|
||||
_16=n;
|
||||
dojo.setContext.apply(dojo,n);
|
||||
return old;
|
||||
};
|
||||
dojo.popContext=function(){
|
||||
var oc=_16;
|
||||
if(!_15.length){
|
||||
return oc;
|
||||
}
|
||||
dojo.setContext.apply(dojo,_15.pop());
|
||||
return oc;
|
||||
};
|
||||
dojo._inContext=function(g,d,f){
|
||||
var a=dojo._toArray(arguments);
|
||||
f=a.pop();
|
||||
if(a.length==1){
|
||||
d=null;
|
||||
}
|
||||
dojo.pushContext(g,d);
|
||||
var r=f();
|
||||
dojo.popContext();
|
||||
return r;
|
||||
};
|
||||
})();
|
||||
dojo._initFired=false;
|
||||
dojo._loadInit=function(e){
|
||||
dojo._initFired=true;
|
||||
var _17=(e&&e.type)?e.type.toLowerCase():"load";
|
||||
if(arguments.callee.initialized||(_17!="domcontentloaded"&&_17!="load")){
|
||||
return;
|
||||
}
|
||||
arguments.callee.initialized=true;
|
||||
if(dojo._inFlightCount==0){
|
||||
dojo._modulesLoaded();
|
||||
}
|
||||
};
|
||||
if(!dojo.config.afterOnLoad){
|
||||
window.addEventListener("DOMContentLoaded",function(e){
|
||||
dojo._loadInit(e);
|
||||
},false);
|
||||
}
|
||||
}
|
||||
(function(){
|
||||
var mp=dojo.config["modulePaths"];
|
||||
if(mp){
|
||||
for(var _18 in mp){
|
||||
dojo.registerModulePath(_18,mp[_18]);
|
||||
}
|
||||
}
|
||||
})();
|
||||
if(dojo.config.isDebug){
|
||||
console.log=function(m){
|
||||
var s=Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
|
||||
s.logStringMessage(m);
|
||||
};
|
||||
console.debug=function(){
|
||||
};
|
||||
}
|
||||
153
lib/dojo/_base/_loader/hostenv_rhino.js
Normal file
153
lib/dojo/_base/_loader/hostenv_rhino.js
Normal file
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(dojo.config["baseUrl"]){
|
||||
dojo.baseUrl=dojo.config["baseUrl"];
|
||||
}else{
|
||||
dojo.baseUrl="./";
|
||||
}
|
||||
dojo.locale=dojo.locale||String(java.util.Locale.getDefault().toString().replace("_","-").toLowerCase());
|
||||
dojo._name="rhino";
|
||||
dojo.isRhino=true;
|
||||
if(typeof print=="function"){
|
||||
console.debug=print;
|
||||
}
|
||||
if(!("byId" in dojo)){
|
||||
dojo.byId=function(id,_1){
|
||||
if(id&&(typeof id=="string"||id instanceof String)){
|
||||
if(!_1){
|
||||
_1=document;
|
||||
}
|
||||
return _1.getElementById(id);
|
||||
}
|
||||
return id;
|
||||
};
|
||||
}
|
||||
dojo._isLocalUrl=function(_2){
|
||||
var _3=(new java.io.File(_2)).exists();
|
||||
if(!_3){
|
||||
var _4;
|
||||
try{
|
||||
_4=(new java.net.URL(_2)).openStream();
|
||||
_4.close();
|
||||
}
|
||||
finally{
|
||||
if(_4&&_4.close){
|
||||
_4.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
return _3;
|
||||
};
|
||||
dojo._loadUri=function(_5,cb){
|
||||
try{
|
||||
var _6;
|
||||
try{
|
||||
_6=dojo._isLocalUrl(_5);
|
||||
}
|
||||
catch(e){
|
||||
return false;
|
||||
}
|
||||
if(cb){
|
||||
var _7=(_6?readText:readUri)(_5,"UTF-8");
|
||||
if(!eval("''").length){
|
||||
_7=String(_7).replace(/[\u200E\u200F\u202A-\u202E]/g,function(_8){
|
||||
return "\\u"+_8.charCodeAt(0).toString(16);
|
||||
});
|
||||
}
|
||||
cb(eval("("+_7+")"));
|
||||
}else{
|
||||
load(_5);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch(e){
|
||||
return false;
|
||||
}
|
||||
};
|
||||
dojo.exit=function(_9){
|
||||
quit(_9);
|
||||
};
|
||||
function readText(_a,_b){
|
||||
_b=_b||"utf-8";
|
||||
var jf=new java.io.File(_a);
|
||||
var is=new java.io.FileInputStream(jf);
|
||||
return dj_readInputStream(is,_b);
|
||||
};
|
||||
function readUri(_c,_d){
|
||||
var _e=(new java.net.URL(_c)).openConnection();
|
||||
_d=_d||_e.getContentEncoding()||"utf-8";
|
||||
var is=_e.getInputStream();
|
||||
return dj_readInputStream(is,_d);
|
||||
};
|
||||
function dj_readInputStream(is,_f){
|
||||
var _10=new java.io.BufferedReader(new java.io.InputStreamReader(is,_f));
|
||||
try{
|
||||
var sb=new java.lang.StringBuffer();
|
||||
var _11="";
|
||||
while((_11=_10.readLine())!==null){
|
||||
sb.append(_11);
|
||||
sb.append(java.lang.System.getProperty("line.separator"));
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
finally{
|
||||
_10.close();
|
||||
}
|
||||
};
|
||||
dojo._getText=function(uri,_12){
|
||||
try{
|
||||
var _13=dojo._isLocalUrl(uri);
|
||||
var _14=(_13?readText:readUri)(uri,"UTF-8");
|
||||
if(_14!==null){
|
||||
_14+="";
|
||||
}
|
||||
return _14;
|
||||
}
|
||||
catch(e){
|
||||
if(_12){
|
||||
return null;
|
||||
}else{
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
};
|
||||
dojo.doc=typeof document!="undefined"?document:null;
|
||||
dojo.body=function(){
|
||||
return document.body;
|
||||
};
|
||||
if(typeof setTimeout=="undefined"||typeof clearTimeout=="undefined"){
|
||||
dojo._timeouts=[];
|
||||
clearTimeout=function(idx){
|
||||
if(!dojo._timeouts[idx]){
|
||||
return;
|
||||
}
|
||||
dojo._timeouts[idx].stop();
|
||||
};
|
||||
setTimeout=function(_15,_16){
|
||||
var def={sleepTime:_16,hasSlept:false,run:function(){
|
||||
if(!this.hasSlept){
|
||||
this.hasSlept=true;
|
||||
java.lang.Thread.currentThread().sleep(this.sleepTime);
|
||||
}
|
||||
try{
|
||||
_15();
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
}};
|
||||
var _17=new java.lang.Runnable(def);
|
||||
var _18=new java.lang.Thread(_17);
|
||||
_18.start();
|
||||
return dojo._timeouts.push(_18)-1;
|
||||
};
|
||||
}
|
||||
if(dojo.config["modulePaths"]){
|
||||
for(var param in dojo.config["modulePaths"]){
|
||||
dojo.registerModulePath(param,dojo.config["modulePaths"][param]);
|
||||
}
|
||||
}
|
||||
50
lib/dojo/_base/_loader/hostenv_spidermonkey.js
Normal file
50
lib/dojo/_base/_loader/hostenv_spidermonkey.js
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(dojo.config["baseUrl"]){
|
||||
dojo.baseUrl=dojo.config["baseUrl"];
|
||||
}else{
|
||||
dojo.baseUrl="./";
|
||||
}
|
||||
dojo._name="spidermonkey";
|
||||
dojo.isSpidermonkey=true;
|
||||
dojo.exit=function(_1){
|
||||
quit(_1);
|
||||
};
|
||||
if(typeof print=="function"){
|
||||
console.debug=print;
|
||||
}
|
||||
if(typeof line2pc=="undefined"){
|
||||
throw new Error("attempt to use SpiderMonkey host environment when no 'line2pc' global");
|
||||
}
|
||||
dojo._spidermonkeyCurrentFile=function(_2){
|
||||
var s="";
|
||||
try{
|
||||
throw Error("whatever");
|
||||
}
|
||||
catch(e){
|
||||
s=e.stack;
|
||||
}
|
||||
var _3=s.match(/[^@]*\.js/gi);
|
||||
if(!_3){
|
||||
throw Error("could not parse stack string: '"+s+"'");
|
||||
}
|
||||
var _4=(typeof _2!="undefined"&&_2)?_3[_2+1]:_3[_3.length-1];
|
||||
if(!_4){
|
||||
throw Error("could not find file name in stack string '"+s+"'");
|
||||
}
|
||||
return _4;
|
||||
};
|
||||
dojo._loadUri=function(_5){
|
||||
var ok=load(_5);
|
||||
return 1;
|
||||
};
|
||||
if(dojo.config["modulePaths"]){
|
||||
for(var param in dojo.config["modulePaths"]){
|
||||
dojo.registerModulePath(param,dojo.config["modulePaths"][param]);
|
||||
}
|
||||
}
|
||||
300
lib/dojo/_base/_loader/loader.js
Normal file
300
lib/dojo/_base/_loader/loader.js
Normal file
@@ -0,0 +1,300 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo.foo"]){
|
||||
dojo._hasResource["dojo.foo"]=true;
|
||||
(function(){
|
||||
var d=dojo;
|
||||
d.mixin(d,{_loadedModules:{},_inFlightCount:0,_hasResource:{},_modulePrefixes:{dojo:{name:"dojo",value:"."},doh:{name:"doh",value:"../util/doh"},tests:{name:"tests",value:"tests"}},_moduleHasPrefix:function(_1){
|
||||
var mp=d._modulePrefixes;
|
||||
return !!(mp[_1]&&mp[_1].value);
|
||||
},_getModulePrefix:function(_2){
|
||||
var mp=d._modulePrefixes;
|
||||
if(d._moduleHasPrefix(_2)){
|
||||
return mp[_2].value;
|
||||
}
|
||||
return _2;
|
||||
},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false});
|
||||
dojo._loadPath=function(_3,_4,cb){
|
||||
var _5=((_3.charAt(0)=="/"||_3.match(/^\w+:/))?"":d.baseUrl)+_3;
|
||||
try{
|
||||
return !_4?d._loadUri(_5,cb):d._loadUriAndCheck(_5,_4,cb);
|
||||
}
|
||||
catch(e){
|
||||
console.error(e);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
dojo._loadUri=function(_6,cb){
|
||||
if(d._loadedUrls[_6]){
|
||||
return true;
|
||||
}
|
||||
d._inFlightCount++;
|
||||
var _7=d._getText(_6,true);
|
||||
if(_7){
|
||||
d._loadedUrls[_6]=true;
|
||||
d._loadedUrls.push(_6);
|
||||
if(cb){
|
||||
_7="("+_7+")";
|
||||
}else{
|
||||
_7=d._scopePrefix+_7+d._scopeSuffix;
|
||||
}
|
||||
if(!d.isIE){
|
||||
_7+="\r\n//@ sourceURL="+_6;
|
||||
}
|
||||
var _8=d["eval"](_7);
|
||||
if(cb){
|
||||
cb(_8);
|
||||
}
|
||||
}
|
||||
if(--d._inFlightCount==0&&d._postLoad&&d._loaders.length){
|
||||
setTimeout(function(){
|
||||
if(d._inFlightCount==0){
|
||||
d._callLoaded();
|
||||
}
|
||||
},0);
|
||||
}
|
||||
return !!_7;
|
||||
};
|
||||
dojo._loadUriAndCheck=function(_9,_a,cb){
|
||||
var ok=false;
|
||||
try{
|
||||
ok=d._loadUri(_9,cb);
|
||||
}
|
||||
catch(e){
|
||||
console.error("failed loading "+_9+" with error: "+e);
|
||||
}
|
||||
return !!(ok&&d._loadedModules[_a]);
|
||||
};
|
||||
dojo.loaded=function(){
|
||||
d._loadNotifying=true;
|
||||
d._postLoad=true;
|
||||
var _b=d._loaders;
|
||||
d._loaders=[];
|
||||
for(var x=0;x<_b.length;x++){
|
||||
_b[x]();
|
||||
}
|
||||
d._loadNotifying=false;
|
||||
if(d._postLoad&&d._inFlightCount==0&&_b.length){
|
||||
d._callLoaded();
|
||||
}
|
||||
};
|
||||
dojo.unloaded=function(){
|
||||
var _c=d._unloaders;
|
||||
while(_c.length){
|
||||
(_c.pop())();
|
||||
}
|
||||
};
|
||||
d._onto=function(_d,_e,fn){
|
||||
if(!fn){
|
||||
_d.push(_e);
|
||||
}else{
|
||||
if(fn){
|
||||
var _f=(typeof fn=="string")?_e[fn]:fn;
|
||||
_d.push(function(){
|
||||
_f.call(_e);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
dojo.ready=dojo.addOnLoad=function(obj,_10){
|
||||
d._onto(d._loaders,obj,_10);
|
||||
if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){
|
||||
d._callLoaded();
|
||||
}
|
||||
};
|
||||
var dca=d.config.addOnLoad;
|
||||
if(dca){
|
||||
d.addOnLoad[(dca instanceof Array?"apply":"call")](d,dca);
|
||||
}
|
||||
dojo._modulesLoaded=function(){
|
||||
if(d._postLoad){
|
||||
return;
|
||||
}
|
||||
if(d._inFlightCount>0){
|
||||
console.warn("files still in flight!");
|
||||
return;
|
||||
}
|
||||
d._callLoaded();
|
||||
};
|
||||
dojo._callLoaded=function(){
|
||||
if(typeof setTimeout=="object"||(d.config.useXDomain&&d.isOpera)){
|
||||
setTimeout(d.isAIR?function(){
|
||||
d.loaded();
|
||||
}:d._scopeName+".loaded();",0);
|
||||
}else{
|
||||
d.loaded();
|
||||
}
|
||||
};
|
||||
dojo._getModuleSymbols=function(_11){
|
||||
var _12=_11.split(".");
|
||||
for(var i=_12.length;i>0;i--){
|
||||
var _13=_12.slice(0,i).join(".");
|
||||
if(i==1&&!d._moduleHasPrefix(_13)){
|
||||
_12[0]="../"+_12[0];
|
||||
}else{
|
||||
var _14=d._getModulePrefix(_13);
|
||||
if(_14!=_13){
|
||||
_12.splice(0,i,_14);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return _12;
|
||||
};
|
||||
dojo._global_omit_module_check=false;
|
||||
dojo.loadInit=function(_15){
|
||||
_15();
|
||||
};
|
||||
dojo._loadModule=dojo.require=function(_16,_17){
|
||||
_17=d._global_omit_module_check||_17;
|
||||
var _18=d._loadedModules[_16];
|
||||
if(_18){
|
||||
return _18;
|
||||
}
|
||||
var _19=d._getModuleSymbols(_16).join("/")+".js";
|
||||
var _1a=!_17?_16:null;
|
||||
var ok=d._loadPath(_19,_1a);
|
||||
if(!ok&&!_17){
|
||||
throw new Error("Could not load '"+_16+"'; last tried '"+_19+"'");
|
||||
}
|
||||
if(!_17&&!d._isXDomain){
|
||||
_18=d._loadedModules[_16];
|
||||
if(!_18){
|
||||
throw new Error("symbol '"+_16+"' is not defined after loading '"+_19+"'");
|
||||
}
|
||||
}
|
||||
return _18;
|
||||
};
|
||||
dojo.provide=function(_1b){
|
||||
_1b=_1b+"";
|
||||
return (d._loadedModules[_1b]=d.getObject(_1b,true));
|
||||
};
|
||||
dojo.platformRequire=function(_1c){
|
||||
var _1d=_1c.common||[];
|
||||
var _1e=_1d.concat(_1c[d._name]||_1c["default"]||[]);
|
||||
for(var x=0;x<_1e.length;x++){
|
||||
var _1f=_1e[x];
|
||||
if(_1f.constructor==Array){
|
||||
d._loadModule.apply(d,_1f);
|
||||
}else{
|
||||
d._loadModule(_1f);
|
||||
}
|
||||
}
|
||||
};
|
||||
dojo.requireIf=function(_20,_21){
|
||||
if(_20===true){
|
||||
var _22=[];
|
||||
for(var i=1;i<arguments.length;i++){
|
||||
_22.push(arguments[i]);
|
||||
}
|
||||
d.require.apply(d,_22);
|
||||
}
|
||||
};
|
||||
dojo.requireAfterIf=d.requireIf;
|
||||
dojo.registerModulePath=function(_23,_24){
|
||||
d._modulePrefixes[_23]={name:_23,value:_24};
|
||||
};
|
||||
dojo.requireLocalization=function(_25,_26,_27,_28){
|
||||
d.require("dojo.i18n");
|
||||
d.i18n._requireLocalization.apply(d.hostenv,arguments);
|
||||
};
|
||||
var ore=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),ire=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");
|
||||
dojo._Url=function(){
|
||||
var n=null,_29=arguments,uri=[_29[0]];
|
||||
for(var i=1;i<_29.length;i++){
|
||||
if(!_29[i]){
|
||||
continue;
|
||||
}
|
||||
var _2a=new d._Url(_29[i]+""),_2b=new d._Url(uri[0]+"");
|
||||
if(_2a.path==""&&!_2a.scheme&&!_2a.authority&&!_2a.query){
|
||||
if(_2a.fragment!=n){
|
||||
_2b.fragment=_2a.fragment;
|
||||
}
|
||||
_2a=_2b;
|
||||
}else{
|
||||
if(!_2a.scheme){
|
||||
_2a.scheme=_2b.scheme;
|
||||
if(!_2a.authority){
|
||||
_2a.authority=_2b.authority;
|
||||
if(_2a.path.charAt(0)!="/"){
|
||||
var _2c=_2b.path.substring(0,_2b.path.lastIndexOf("/")+1)+_2a.path;
|
||||
var _2d=_2c.split("/");
|
||||
for(var j=0;j<_2d.length;j++){
|
||||
if(_2d[j]=="."){
|
||||
if(j==_2d.length-1){
|
||||
_2d[j]="";
|
||||
}else{
|
||||
_2d.splice(j,1);
|
||||
j--;
|
||||
}
|
||||
}else{
|
||||
if(j>0&&!(j==1&&_2d[0]=="")&&_2d[j]==".."&&_2d[j-1]!=".."){
|
||||
if(j==(_2d.length-1)){
|
||||
_2d.splice(j,1);
|
||||
_2d[j-1]="";
|
||||
}else{
|
||||
_2d.splice(j-1,2);
|
||||
j-=2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_2a.path=_2d.join("/");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
uri=[];
|
||||
if(_2a.scheme){
|
||||
uri.push(_2a.scheme,":");
|
||||
}
|
||||
if(_2a.authority){
|
||||
uri.push("//",_2a.authority);
|
||||
}
|
||||
uri.push(_2a.path);
|
||||
if(_2a.query){
|
||||
uri.push("?",_2a.query);
|
||||
}
|
||||
if(_2a.fragment){
|
||||
uri.push("#",_2a.fragment);
|
||||
}
|
||||
}
|
||||
this.uri=uri.join("");
|
||||
var r=this.uri.match(ore);
|
||||
this.scheme=r[2]||(r[1]?"":n);
|
||||
this.authority=r[4]||(r[3]?"":n);
|
||||
this.path=r[5];
|
||||
this.query=r[7]||(r[6]?"":n);
|
||||
this.fragment=r[9]||(r[8]?"":n);
|
||||
if(this.authority!=n){
|
||||
r=this.authority.match(ire);
|
||||
this.user=r[3]||n;
|
||||
this.password=r[4]||n;
|
||||
this.host=r[6]||r[7];
|
||||
this.port=r[9]||n;
|
||||
}
|
||||
};
|
||||
dojo._Url.prototype.toString=function(){
|
||||
return this.uri;
|
||||
};
|
||||
dojo.moduleUrl=function(_2e,url){
|
||||
var loc=d._getModuleSymbols(_2e).join("/");
|
||||
if(!loc){
|
||||
return null;
|
||||
}
|
||||
if(loc.lastIndexOf("/")!=loc.length-1){
|
||||
loc+="/";
|
||||
}
|
||||
var _2f=loc.indexOf(":");
|
||||
if(loc.charAt(0)!="/"&&(_2f==-1||_2f>loc.indexOf("/"))){
|
||||
loc=d.baseUrl+loc;
|
||||
}
|
||||
return new d._Url(loc,url);
|
||||
};
|
||||
})();
|
||||
}
|
||||
59
lib/dojo/_base/_loader/loader_debug.js
Normal file
59
lib/dojo/_base/_loader/loader_debug.js
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base._loader.loader_debug"]){
|
||||
dojo._hasResource["dojo._base._loader.loader_debug"]=true;
|
||||
dojo.provide("dojo._base._loader.loader_debug");
|
||||
dojo.nonDebugProvide=dojo.provide;
|
||||
dojo.provide=function(_1){
|
||||
var _2=dojo["_xdDebugQueue"];
|
||||
if(_2&&_2.length>0&&_1==_2["currentResourceName"]){
|
||||
if(dojo.isAIR){
|
||||
window.setTimeout(function(){
|
||||
dojo._xdDebugFileLoaded(_1);
|
||||
},1);
|
||||
}else{
|
||||
window.setTimeout(dojo._scopeName+"._xdDebugFileLoaded('"+_1+"')",1);
|
||||
}
|
||||
}
|
||||
return dojo.nonDebugProvide.apply(dojo,arguments);
|
||||
};
|
||||
dojo._xdDebugFileLoaded=function(_3){
|
||||
if(!dojo._xdDebugScopeChecked){
|
||||
if(dojo._scopeName!="dojo"){
|
||||
window.dojo=window[dojo.config.scopeMap[0][1]];
|
||||
window.dijit=window[dojo.config.scopeMap[1][1]];
|
||||
window.dojox=window[dojo.config.scopeMap[2][1]];
|
||||
}
|
||||
dojo._xdDebugScopeChecked=true;
|
||||
}
|
||||
var _4=dojo._xdDebugQueue;
|
||||
if(_3&&_3==_4.currentResourceName){
|
||||
_4.shift();
|
||||
}
|
||||
if(_4.length==0){
|
||||
dojo._xdWatchInFlight();
|
||||
}
|
||||
if(_4.length==0){
|
||||
_4.currentResourceName=null;
|
||||
for(var _5 in dojo._xdInFlight){
|
||||
if(dojo._xdInFlight[_5]===true){
|
||||
return;
|
||||
}
|
||||
}
|
||||
dojo._xdNotifyLoaded();
|
||||
}else{
|
||||
if(_3==_4.currentResourceName){
|
||||
_4.currentResourceName=_4[0].resourceName;
|
||||
var _6=document.createElement("script");
|
||||
_6.type="text/javascript";
|
||||
_6.src=_4[0].resourcePath;
|
||||
document.getElementsByTagName("head")[0].appendChild(_6);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
465
lib/dojo/_base/_loader/loader_xd.js
Normal file
465
lib/dojo/_base/_loader/loader_xd.js
Normal file
@@ -0,0 +1,465 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base._loader.loader_xd"]){
|
||||
dojo._hasResource["dojo._base._loader.loader_xd"]=true;
|
||||
dojo.provide("dojo._base._loader.loader_xd");
|
||||
dojo._xdReset=function(){
|
||||
dojo._isXDomain=dojo.config.useXDomain||false;
|
||||
dojo._xdClearInterval();
|
||||
dojo._xdInFlight={};
|
||||
dojo._xdOrderedReqs=[];
|
||||
dojo._xdDepMap={};
|
||||
dojo._xdContents=[];
|
||||
dojo._xdDefList=[];
|
||||
};
|
||||
dojo._xdClearInterval=function(){
|
||||
if(dojo._xdTimer){
|
||||
clearInterval(dojo._xdTimer);
|
||||
dojo._xdTimer=0;
|
||||
}
|
||||
};
|
||||
dojo._xdReset();
|
||||
dojo._xdCreateResource=function(_1,_2,_3){
|
||||
var _4=_1.replace(/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,"");
|
||||
var _5=[];
|
||||
var _6=/dojo.(require|requireIf|provide|requireAfterIf|platformRequire|requireLocalization)\s*\(([\w\W]*?)\)/mg;
|
||||
var _7;
|
||||
while((_7=_6.exec(_4))!=null){
|
||||
if(_7[1]=="requireLocalization"){
|
||||
eval(_7[0]);
|
||||
}else{
|
||||
_5.push("\""+_7[1]+"\", "+_7[2]);
|
||||
}
|
||||
}
|
||||
var _8=[];
|
||||
_8.push(dojo._scopeName+"._xdResourceLoaded(function("+dojo._scopePrefixArgs+"){\n");
|
||||
var _9=dojo._xdExtractLoadInits(_1);
|
||||
if(_9){
|
||||
_1=_9[0];
|
||||
for(var i=1;i<_9.length;i++){
|
||||
_8.push(_9[i]+";\n");
|
||||
}
|
||||
}
|
||||
_8.push("return {");
|
||||
if(_5.length>0){
|
||||
_8.push("depends: [");
|
||||
for(i=0;i<_5.length;i++){
|
||||
if(i>0){
|
||||
_8.push(",\n");
|
||||
}
|
||||
_8.push("["+_5[i]+"]");
|
||||
}
|
||||
_8.push("],");
|
||||
}
|
||||
_8.push("\ndefineResource: function("+dojo._scopePrefixArgs+"){");
|
||||
if(!dojo.config["debugAtAllCosts"]||_2=="dojo._base._loader.loader_debug"){
|
||||
_8.push(_1);
|
||||
}
|
||||
_8.push("\n}, resourceName: '"+_2+"', resourcePath: '"+_3+"'};});");
|
||||
return _8.join("");
|
||||
};
|
||||
dojo._xdExtractLoadInits=function(_a){
|
||||
var _b=/dojo.loadInit\s*\(/g;
|
||||
_b.lastIndex=0;
|
||||
var _c=/[\(\)]/g;
|
||||
_c.lastIndex=0;
|
||||
var _d=[];
|
||||
var _e;
|
||||
while((_e=_b.exec(_a))){
|
||||
_c.lastIndex=_b.lastIndex;
|
||||
var _f=1;
|
||||
var _10;
|
||||
while((_10=_c.exec(_a))){
|
||||
if(_10[0]==")"){
|
||||
_f-=1;
|
||||
}else{
|
||||
_f+=1;
|
||||
}
|
||||
if(_f==0){
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(_f!=0){
|
||||
throw "unmatched paren around character "+_c.lastIndex+" in: "+_a;
|
||||
}
|
||||
var _11=_b.lastIndex-_e[0].length;
|
||||
_d.push(_a.substring(_11,_c.lastIndex));
|
||||
var _12=_c.lastIndex-_11;
|
||||
_a=_a.substring(0,_11)+_a.substring(_c.lastIndex,_a.length);
|
||||
_b.lastIndex=_c.lastIndex-_12;
|
||||
_b.lastIndex=_c.lastIndex;
|
||||
}
|
||||
if(_d.length>0){
|
||||
_d.unshift(_a);
|
||||
}
|
||||
return (_d.length?_d:null);
|
||||
};
|
||||
dojo._xdIsXDomainPath=function(_13){
|
||||
var _14=_13.indexOf(":");
|
||||
var _15=_13.indexOf("/");
|
||||
if(_14>0&&_14<_15){
|
||||
return true;
|
||||
}else{
|
||||
var url=dojo.baseUrl;
|
||||
_14=url.indexOf(":");
|
||||
_15=url.indexOf("/");
|
||||
if(_14>0&&_14<_15&&(!location.host||url.indexOf("http://"+location.host)!=0)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
dojo._loadPath=function(_16,_17,cb){
|
||||
var _18=dojo._xdIsXDomainPath(_16);
|
||||
dojo._isXDomain|=_18;
|
||||
var uri=((_16.charAt(0)=="/"||_16.match(/^\w+:/))?"":dojo.baseUrl)+_16;
|
||||
try{
|
||||
return ((!_17||dojo._isXDomain)?dojo._loadUri(uri,cb,_18,_17):dojo._loadUriAndCheck(uri,_17,cb));
|
||||
}
|
||||
catch(e){
|
||||
console.error(e);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
dojo._xdCharSet="utf-8";
|
||||
dojo._loadUri=function(uri,cb,_19,_1a){
|
||||
if(dojo._loadedUrls[uri]){
|
||||
return 1;
|
||||
}
|
||||
if(dojo._isXDomain&&_1a&&_1a!="dojo.i18n"){
|
||||
dojo._xdOrderedReqs.push(_1a);
|
||||
if(_19||uri.indexOf("/nls/")==-1){
|
||||
dojo._xdInFlight[_1a]=true;
|
||||
dojo._inFlightCount++;
|
||||
}
|
||||
if(!dojo._xdTimer){
|
||||
if(dojo.isAIR){
|
||||
dojo._xdTimer=setInterval(function(){
|
||||
dojo._xdWatchInFlight();
|
||||
},100);
|
||||
}else{
|
||||
dojo._xdTimer=setInterval(dojo._scopeName+"._xdWatchInFlight();",100);
|
||||
}
|
||||
}
|
||||
dojo._xdStartTime=(new Date()).getTime();
|
||||
}
|
||||
if(_19){
|
||||
var _1b=uri.lastIndexOf(".");
|
||||
if(_1b<=0){
|
||||
_1b=uri.length-1;
|
||||
}
|
||||
var _1c=uri.substring(0,_1b)+".xd";
|
||||
if(_1b!=uri.length-1){
|
||||
_1c+=uri.substring(_1b,uri.length);
|
||||
}
|
||||
if(dojo.isAIR){
|
||||
_1c=_1c.replace("app:/","/");
|
||||
}
|
||||
var _1d=document.createElement("script");
|
||||
_1d.type="text/javascript";
|
||||
if(dojo._xdCharSet){
|
||||
_1d.charset=dojo._xdCharSet;
|
||||
}
|
||||
_1d.src=_1c;
|
||||
if(!dojo.headElement){
|
||||
dojo._headElement=document.getElementsByTagName("head")[0];
|
||||
if(!dojo._headElement){
|
||||
dojo._headElement=document.getElementsByTagName("html")[0];
|
||||
}
|
||||
}
|
||||
dojo._headElement.appendChild(_1d);
|
||||
}else{
|
||||
var _1e=dojo._getText(uri,null,true);
|
||||
if(_1e==null){
|
||||
return 0;
|
||||
}
|
||||
if(dojo._isXDomain&&uri.indexOf("/nls/")==-1&&_1a!="dojo.i18n"){
|
||||
var res=dojo._xdCreateResource(_1e,_1a,uri);
|
||||
dojo.eval(res);
|
||||
}else{
|
||||
if(cb){
|
||||
_1e="("+_1e+")";
|
||||
}else{
|
||||
_1e=dojo._scopePrefix+_1e+dojo._scopeSuffix;
|
||||
}
|
||||
var _1f=dojo["eval"](_1e+"\r\n//@ sourceURL="+uri);
|
||||
if(cb){
|
||||
cb(_1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
dojo._loadedUrls[uri]=true;
|
||||
dojo._loadedUrls.push(uri);
|
||||
return true;
|
||||
};
|
||||
dojo._xdResourceLoaded=function(res){
|
||||
res=res.apply(dojo.global,dojo._scopeArgs);
|
||||
var _20=res.depends;
|
||||
var _21=null;
|
||||
var _22=null;
|
||||
var _23=[];
|
||||
if(_20&&_20.length>0){
|
||||
var dep=null;
|
||||
var _24=0;
|
||||
var _25=false;
|
||||
for(var i=0;i<_20.length;i++){
|
||||
dep=_20[i];
|
||||
if(dep[0]=="provide"){
|
||||
_23.push(dep[1]);
|
||||
}else{
|
||||
if(!_21){
|
||||
_21=[];
|
||||
}
|
||||
if(!_22){
|
||||
_22=[];
|
||||
}
|
||||
var _26=dojo._xdUnpackDependency(dep);
|
||||
if(_26.requires){
|
||||
_21=_21.concat(_26.requires);
|
||||
}
|
||||
if(_26.requiresAfter){
|
||||
_22=_22.concat(_26.requiresAfter);
|
||||
}
|
||||
}
|
||||
var _27=dep[0];
|
||||
var _28=_27.split(".");
|
||||
if(_28.length==2){
|
||||
dojo[_28[0]][_28[1]].apply(dojo[_28[0]],dep.slice(1));
|
||||
}else{
|
||||
dojo[_27].apply(dojo,dep.slice(1));
|
||||
}
|
||||
}
|
||||
if(_23.length==1&&_23[0]=="dojo._base._loader.loader_debug"){
|
||||
res.defineResource(dojo);
|
||||
}else{
|
||||
var _29=dojo._xdContents.push({content:res.defineResource,resourceName:res["resourceName"],resourcePath:res["resourcePath"],isDefined:false})-1;
|
||||
for(i=0;i<_23.length;i++){
|
||||
dojo._xdDepMap[_23[i]]={requires:_21,requiresAfter:_22,contentIndex:_29};
|
||||
}
|
||||
}
|
||||
for(i=0;i<_23.length;i++){
|
||||
dojo._xdInFlight[_23[i]]=false;
|
||||
}
|
||||
}
|
||||
};
|
||||
dojo._xdLoadFlattenedBundle=function(_2a,_2b,_2c,_2d){
|
||||
_2c=_2c||"root";
|
||||
var _2e=dojo.i18n.normalizeLocale(_2c).replace("-","_");
|
||||
var _2f=[_2a,"nls",_2b].join(".");
|
||||
var _30=dojo["provide"](_2f);
|
||||
_30[_2e]=_2d;
|
||||
var _31=[_2a,_2e,_2b].join(".");
|
||||
var _32=dojo._xdBundleMap[_31];
|
||||
if(_32){
|
||||
for(var _33 in _32){
|
||||
_30[_33]=_2d;
|
||||
}
|
||||
}
|
||||
};
|
||||
dojo._xdInitExtraLocales=function(){
|
||||
var _34=dojo.config.extraLocale;
|
||||
if(_34){
|
||||
if(!_34 instanceof Array){
|
||||
_34=[_34];
|
||||
}
|
||||
dojo._xdReqLoc=dojo.xdRequireLocalization;
|
||||
dojo.xdRequireLocalization=function(m,b,_35,_36){
|
||||
dojo._xdReqLoc(m,b,_35,_36);
|
||||
if(_35){
|
||||
return;
|
||||
}
|
||||
for(var i=0;i<_34.length;i++){
|
||||
dojo._xdReqLoc(m,b,_34[i],_36);
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
dojo._xdBundleMap={};
|
||||
dojo.xdRequireLocalization=function(_37,_38,_39,_3a){
|
||||
if(dojo._xdInitExtraLocales){
|
||||
dojo._xdInitExtraLocales();
|
||||
dojo._xdInitExtraLocales=null;
|
||||
dojo.xdRequireLocalization.apply(dojo,arguments);
|
||||
return;
|
||||
}
|
||||
var _3b=_3a.split(",");
|
||||
var _3c=dojo.i18n.normalizeLocale(_39);
|
||||
var _3d="";
|
||||
for(var i=0;i<_3b.length;i++){
|
||||
if(_3c.indexOf(_3b[i])==0){
|
||||
if(_3b[i].length>_3d.length){
|
||||
_3d=_3b[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
var _3e=_3d.replace("-","_");
|
||||
var _3f=dojo.getObject([_37,"nls",_38].join("."));
|
||||
if(!_3f||!_3f[_3e]){
|
||||
var _40=[_37,(_3e||"root"),_38].join(".");
|
||||
var _41=dojo._xdBundleMap[_40];
|
||||
if(!_41){
|
||||
_41=dojo._xdBundleMap[_40]={};
|
||||
}
|
||||
_41[_3c.replace("-","_")]=true;
|
||||
dojo.require(_37+".nls"+(_3d?"."+_3d:"")+"."+_38);
|
||||
}
|
||||
};
|
||||
dojo._xdRealRequireLocalization=dojo.requireLocalization;
|
||||
dojo.requireLocalization=function(_42,_43,_44,_45){
|
||||
var _46=dojo.moduleUrl(_42).toString();
|
||||
if(dojo._xdIsXDomainPath(_46)){
|
||||
return dojo.xdRequireLocalization.apply(dojo,arguments);
|
||||
}else{
|
||||
return dojo._xdRealRequireLocalization.apply(dojo,arguments);
|
||||
}
|
||||
};
|
||||
dojo._xdUnpackDependency=function(dep){
|
||||
var _47=null;
|
||||
var _48=null;
|
||||
switch(dep[0]){
|
||||
case "requireIf":
|
||||
case "requireAfterIf":
|
||||
if(dep[1]===true){
|
||||
_47=[{name:dep[2],content:null}];
|
||||
}
|
||||
break;
|
||||
case "platformRequire":
|
||||
var _49=dep[1];
|
||||
var _4a=_49["common"]||[];
|
||||
_47=(_49[dojo.hostenv.name_])?_4a.concat(_49[dojo.hostenv.name_]||[]):_4a.concat(_49["default"]||[]);
|
||||
if(_47){
|
||||
for(var i=0;i<_47.length;i++){
|
||||
if(_47[i] instanceof Array){
|
||||
_47[i]={name:_47[i][0],content:null};
|
||||
}else{
|
||||
_47[i]={name:_47[i],content:null};
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "require":
|
||||
_47=[{name:dep[1],content:null}];
|
||||
break;
|
||||
case "i18n._preloadLocalizations":
|
||||
dojo.i18n._preloadLocalizations.apply(dojo.i18n._preloadLocalizations,dep.slice(1));
|
||||
break;
|
||||
}
|
||||
if(dep[0]=="requireAfterIf"||dep[0]=="requireIf"){
|
||||
_48=_47;
|
||||
_47=null;
|
||||
}
|
||||
return {requires:_47,requiresAfter:_48};
|
||||
};
|
||||
dojo._xdWalkReqs=function(){
|
||||
var _4b=null;
|
||||
var req;
|
||||
for(var i=0;i<dojo._xdOrderedReqs.length;i++){
|
||||
req=dojo._xdOrderedReqs[i];
|
||||
if(dojo._xdDepMap[req]){
|
||||
_4b=[req];
|
||||
_4b[req]=true;
|
||||
dojo._xdEvalReqs(_4b);
|
||||
}
|
||||
}
|
||||
};
|
||||
dojo._xdEvalReqs=function(_4c){
|
||||
while(_4c.length>0){
|
||||
var req=_4c[_4c.length-1];
|
||||
var res=dojo._xdDepMap[req];
|
||||
var i,_4d,_4e;
|
||||
if(res){
|
||||
_4d=res.requires;
|
||||
if(_4d&&_4d.length>0){
|
||||
for(i=0;i<_4d.length;i++){
|
||||
_4e=_4d[i].name;
|
||||
if(_4e&&!_4c[_4e]){
|
||||
_4c.push(_4e);
|
||||
_4c[_4e]=true;
|
||||
dojo._xdEvalReqs(_4c);
|
||||
}
|
||||
}
|
||||
}
|
||||
var _4f=dojo._xdContents[res.contentIndex];
|
||||
if(!_4f.isDefined){
|
||||
var _50=_4f.content;
|
||||
_50["resourceName"]=_4f["resourceName"];
|
||||
_50["resourcePath"]=_4f["resourcePath"];
|
||||
dojo._xdDefList.push(_50);
|
||||
_4f.isDefined=true;
|
||||
}
|
||||
dojo._xdDepMap[req]=null;
|
||||
_4d=res.requiresAfter;
|
||||
if(_4d&&_4d.length>0){
|
||||
for(i=0;i<_4d.length;i++){
|
||||
_4e=_4d[i].name;
|
||||
if(_4e&&!_4c[_4e]){
|
||||
_4c.push(_4e);
|
||||
_4c[_4e]=true;
|
||||
dojo._xdEvalReqs(_4c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_4c.pop();
|
||||
}
|
||||
};
|
||||
dojo._xdWatchInFlight=function(){
|
||||
var _51="";
|
||||
var _52=(dojo.config.xdWaitSeconds||15)*1000;
|
||||
var _53=(dojo._xdStartTime+_52)<(new Date()).getTime();
|
||||
for(var _54 in dojo._xdInFlight){
|
||||
if(dojo._xdInFlight[_54]===true){
|
||||
if(_53){
|
||||
_51+=_54+" ";
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
dojo._xdClearInterval();
|
||||
if(_53){
|
||||
throw "Could not load cross-domain resources: "+_51;
|
||||
}
|
||||
dojo._xdWalkReqs();
|
||||
var _55=dojo._xdDefList.length;
|
||||
for(var i=0;i<_55;i++){
|
||||
var _56=dojo._xdDefList[i];
|
||||
if(dojo.config["debugAtAllCosts"]&&_56["resourceName"]){
|
||||
if(!dojo["_xdDebugQueue"]){
|
||||
dojo._xdDebugQueue=[];
|
||||
}
|
||||
dojo._xdDebugQueue.push({resourceName:_56.resourceName,resourcePath:_56.resourcePath});
|
||||
}else{
|
||||
_56.apply(dojo.global,dojo._scopeArgs);
|
||||
}
|
||||
}
|
||||
for(i=0;i<dojo._xdContents.length;i++){
|
||||
var _57=dojo._xdContents[i];
|
||||
if(_57.content&&!_57.isDefined){
|
||||
_57.content.apply(dojo.global,dojo._scopeArgs);
|
||||
}
|
||||
}
|
||||
dojo._xdReset();
|
||||
if(dojo["_xdDebugQueue"]&&dojo._xdDebugQueue.length>0){
|
||||
dojo._xdDebugFileLoaded();
|
||||
}else{
|
||||
dojo._xdNotifyLoaded();
|
||||
}
|
||||
};
|
||||
dojo._xdNotifyLoaded=function(){
|
||||
for(var _58 in dojo._xdInFlight){
|
||||
if(typeof dojo._xdInFlight[_58]=="boolean"){
|
||||
return;
|
||||
}
|
||||
}
|
||||
dojo._inFlightCount=0;
|
||||
if(dojo._initFired&&!dojo._loadNotifying){
|
||||
dojo._callLoaded();
|
||||
}
|
||||
};
|
||||
}
|
||||
79
lib/dojo/_base/array.js
Normal file
79
lib/dojo/_base/array.js
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base.array"]){
|
||||
dojo._hasResource["dojo._base.array"]=true;
|
||||
dojo.require("dojo._base.lang");
|
||||
dojo.provide("dojo._base.array");
|
||||
(function(){
|
||||
var _1=function(_2,_3,cb){
|
||||
return [(typeof _2=="string")?_2.split(""):_2,_3||dojo.global,(typeof cb=="string")?new Function("item","index","array",cb):cb];
|
||||
};
|
||||
var _4=function(_5,_6,_7,_8){
|
||||
var _9=_1(_6,_8,_7);
|
||||
_6=_9[0];
|
||||
for(var i=0,l=_6.length;i<l;++i){
|
||||
var _a=!!_9[2].call(_9[1],_6[i],i,_6);
|
||||
if(_5^_a){
|
||||
return _a;
|
||||
}
|
||||
}
|
||||
return _5;
|
||||
};
|
||||
dojo.mixin(dojo,{indexOf:function(_b,_c,_d,_e){
|
||||
var _f=1,end=_b.length||0,i=0;
|
||||
if(_e){
|
||||
i=end-1;
|
||||
_f=end=-1;
|
||||
}
|
||||
if(_d!=undefined){
|
||||
i=_d;
|
||||
}
|
||||
if((_e&&i>end)||i<end){
|
||||
for(;i!=end;i+=_f){
|
||||
if(_b[i]==_c){
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
},lastIndexOf:function(_10,_11,_12){
|
||||
return dojo.indexOf(_10,_11,_12,true);
|
||||
},forEach:function(arr,_13,_14){
|
||||
if(!arr||!arr.length){
|
||||
return;
|
||||
}
|
||||
var _15=_1(arr,_14,_13);
|
||||
arr=_15[0];
|
||||
for(var i=0,l=arr.length;i<l;++i){
|
||||
_15[2].call(_15[1],arr[i],i,arr);
|
||||
}
|
||||
},every:function(arr,_16,_17){
|
||||
return _4(true,arr,_16,_17);
|
||||
},some:function(arr,_18,_19){
|
||||
return _4(false,arr,_18,_19);
|
||||
},map:function(arr,_1a,_1b){
|
||||
var _1c=_1(arr,_1b,_1a);
|
||||
arr=_1c[0];
|
||||
var _1d=(arguments[3]?(new arguments[3]()):[]);
|
||||
for(var i=0,l=arr.length;i<l;++i){
|
||||
_1d.push(_1c[2].call(_1c[1],arr[i],i,arr));
|
||||
}
|
||||
return _1d;
|
||||
},filter:function(arr,_1e,_1f){
|
||||
var _20=_1(arr,_1f,_1e);
|
||||
arr=_20[0];
|
||||
var _21=[];
|
||||
for(var i=0,l=arr.length;i<l;++i){
|
||||
if(_20[2].call(_20[1],arr[i],i,arr)){
|
||||
_21.push(arr[i]);
|
||||
}
|
||||
}
|
||||
return _21;
|
||||
}});
|
||||
})();
|
||||
}
|
||||
22
lib/dojo/_base/browser.js
Normal file
22
lib/dojo/_base/browser.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base.browser"]){
|
||||
dojo._hasResource["dojo._base.browser"]=true;
|
||||
dojo.provide("dojo._base.browser");
|
||||
dojo.require("dojo._base.window");
|
||||
dojo.require("dojo._base.connect");
|
||||
dojo.require("dojo._base.event");
|
||||
dojo.require("dojo._base.html");
|
||||
dojo.require("dojo._base.NodeList");
|
||||
dojo.require("dojo._base.query");
|
||||
dojo.require("dojo._base.xhr");
|
||||
dojo.require("dojo._base.fx");
|
||||
dojo.forEach(dojo.config.require,function(i){
|
||||
dojo["require"](i);
|
||||
});
|
||||
}
|
||||
85
lib/dojo/_base/connect.js
Normal file
85
lib/dojo/_base/connect.js
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base.connect"]){
|
||||
dojo._hasResource["dojo._base.connect"]=true;
|
||||
dojo.provide("dojo._base.connect");
|
||||
dojo.require("dojo._base.lang");
|
||||
dojo._listener={getDispatcher:function(){
|
||||
return function(){
|
||||
var ap=Array.prototype,c=arguments.callee,ls=c._listeners,t=c.target;
|
||||
var r=t&&t.apply(this,arguments);
|
||||
var i,_1;
|
||||
_1=[].concat(ls);
|
||||
for(i in _1){
|
||||
if(!(i in ap)){
|
||||
_1[i].apply(this,arguments);
|
||||
}
|
||||
}
|
||||
return r;
|
||||
};
|
||||
},add:function(_2,_3,_4){
|
||||
_2=_2||dojo.global;
|
||||
var f=_2[_3];
|
||||
if(!f||!f._listeners){
|
||||
var d=dojo._listener.getDispatcher();
|
||||
d.target=f;
|
||||
d._listeners=[];
|
||||
f=_2[_3]=d;
|
||||
}
|
||||
return f._listeners.push(_4);
|
||||
},remove:function(_5,_6,_7){
|
||||
var f=(_5||dojo.global)[_6];
|
||||
if(f&&f._listeners&&_7--){
|
||||
delete f._listeners[_7];
|
||||
}
|
||||
}};
|
||||
dojo.connect=function(_8,_9,_a,_b,_c){
|
||||
var a=arguments,_d=[],i=0;
|
||||
_d.push(dojo.isString(a[0])?null:a[i++],a[i++]);
|
||||
var a1=a[i+1];
|
||||
_d.push(dojo.isString(a1)||dojo.isFunction(a1)?a[i++]:null,a[i++]);
|
||||
for(var l=a.length;i<l;i++){
|
||||
_d.push(a[i]);
|
||||
}
|
||||
return dojo._connect.apply(this,_d);
|
||||
};
|
||||
dojo._connect=function(_e,_f,_10,_11){
|
||||
var l=dojo._listener,h=l.add(_e,_f,dojo.hitch(_10,_11));
|
||||
return [_e,_f,h,l];
|
||||
};
|
||||
dojo.disconnect=function(_12){
|
||||
if(_12&&_12[0]!==undefined){
|
||||
dojo._disconnect.apply(this,_12);
|
||||
delete _12[0];
|
||||
}
|
||||
};
|
||||
dojo._disconnect=function(obj,_13,_14,_15){
|
||||
_15.remove(obj,_13,_14);
|
||||
};
|
||||
dojo._topics={};
|
||||
dojo.subscribe=function(_16,_17,_18){
|
||||
return [_16,dojo._listener.add(dojo._topics,_16,dojo.hitch(_17,_18))];
|
||||
};
|
||||
dojo.unsubscribe=function(_19){
|
||||
if(_19){
|
||||
dojo._listener.remove(dojo._topics,_19[0],_19[1]);
|
||||
}
|
||||
};
|
||||
dojo.publish=function(_1a,_1b){
|
||||
var f=dojo._topics[_1a];
|
||||
if(f){
|
||||
f.apply(this,_1b||[]);
|
||||
}
|
||||
};
|
||||
dojo.connectPublisher=function(_1c,obj,_1d){
|
||||
var pf=function(){
|
||||
dojo.publish(_1c,arguments);
|
||||
};
|
||||
return _1d?dojo.connect(obj,_1d,pf):dojo.connect(obj,pf);
|
||||
};
|
||||
}
|
||||
423
lib/dojo/_base/declare.js
Normal file
423
lib/dojo/_base/declare.js
Normal file
@@ -0,0 +1,423 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base.declare"]){
|
||||
dojo._hasResource["dojo._base.declare"]=true;
|
||||
dojo.provide("dojo._base.declare");
|
||||
dojo.require("dojo._base.lang");
|
||||
dojo.require("dojo._base.array");
|
||||
(function(){
|
||||
var d=dojo,_1=d._mixin,op=Object.prototype,_2=op.toString,_3=new Function,_4=0,_5="constructor";
|
||||
function _6(_7){
|
||||
throw new Error("declare: "+_7);
|
||||
};
|
||||
function _8(_9){
|
||||
var _a=[],_b=[{cls:0,refs:[]}],_c={},_d=1,l=_9.length,i=0,j,_e,_f,top,_10,rec,_11,_12;
|
||||
for(;i<l;++i){
|
||||
_f=_9[i];
|
||||
if(!_f){
|
||||
_6("mixin #"+i+" is unknown. Did you use dojo.require to pull it in?");
|
||||
}else{
|
||||
if(_2.call(_f)!="[object Function]"){
|
||||
_6("mixin #"+i+" is not a callable constructor.");
|
||||
}
|
||||
}
|
||||
_e=_f._meta?_f._meta.bases:[_f];
|
||||
top=0;
|
||||
for(j=_e.length-1;j>=0;--j){
|
||||
_10=_e[j].prototype;
|
||||
if(!_10.hasOwnProperty("declaredClass")){
|
||||
_10.declaredClass="uniqName_"+(_4++);
|
||||
}
|
||||
_11=_10.declaredClass;
|
||||
if(!_c.hasOwnProperty(_11)){
|
||||
_c[_11]={count:0,refs:[],cls:_e[j]};
|
||||
++_d;
|
||||
}
|
||||
rec=_c[_11];
|
||||
if(top&&top!==rec){
|
||||
rec.refs.push(top);
|
||||
++top.count;
|
||||
}
|
||||
top=rec;
|
||||
}
|
||||
++top.count;
|
||||
_b[0].refs.push(top);
|
||||
}
|
||||
while(_b.length){
|
||||
top=_b.pop();
|
||||
_a.push(top.cls);
|
||||
--_d;
|
||||
while(_12=top.refs,_12.length==1){
|
||||
top=_12[0];
|
||||
if(!top||--top.count){
|
||||
top=0;
|
||||
break;
|
||||
}
|
||||
_a.push(top.cls);
|
||||
--_d;
|
||||
}
|
||||
if(top){
|
||||
for(i=0,l=_12.length;i<l;++i){
|
||||
top=_12[i];
|
||||
if(!--top.count){
|
||||
_b.push(top);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_d){
|
||||
_6("can't build consistent linearization");
|
||||
}
|
||||
_f=_9[0];
|
||||
_a[0]=_f?_f._meta&&_f===_a[_a.length-_f._meta.bases.length]?_f._meta.bases.length:1:0;
|
||||
return _a;
|
||||
};
|
||||
function _13(_14,a,f){
|
||||
var _15,_16,_17,_18,_19,_1a,_1b,opf,pos,_1c=this._inherited=this._inherited||{};
|
||||
if(typeof _14=="string"){
|
||||
_15=_14;
|
||||
_14=a;
|
||||
a=f;
|
||||
}
|
||||
f=0;
|
||||
_18=_14.callee;
|
||||
_15=_15||_18.nom;
|
||||
if(!_15){
|
||||
_6("can't deduce a name to call inherited()");
|
||||
}
|
||||
_19=this.constructor._meta;
|
||||
_17=_19.bases;
|
||||
pos=_1c.p;
|
||||
if(_15!=_5){
|
||||
if(_1c.c!==_18){
|
||||
pos=0;
|
||||
_1a=_17[0];
|
||||
_19=_1a._meta;
|
||||
if(_19.hidden[_15]!==_18){
|
||||
_16=_19.chains;
|
||||
if(_16&&typeof _16[_15]=="string"){
|
||||
_6("calling chained method with inherited: "+_15);
|
||||
}
|
||||
do{
|
||||
_19=_1a._meta;
|
||||
_1b=_1a.prototype;
|
||||
if(_19&&(_1b[_15]===_18&&_1b.hasOwnProperty(_15)||_19.hidden[_15]===_18)){
|
||||
break;
|
||||
}
|
||||
}while(_1a=_17[++pos]);
|
||||
pos=_1a?pos:-1;
|
||||
}
|
||||
}
|
||||
_1a=_17[++pos];
|
||||
if(_1a){
|
||||
_1b=_1a.prototype;
|
||||
if(_1a._meta&&_1b.hasOwnProperty(_15)){
|
||||
f=_1b[_15];
|
||||
}else{
|
||||
opf=op[_15];
|
||||
do{
|
||||
_1b=_1a.prototype;
|
||||
f=_1b[_15];
|
||||
if(f&&(_1a._meta?_1b.hasOwnProperty(_15):f!==opf)){
|
||||
break;
|
||||
}
|
||||
}while(_1a=_17[++pos]);
|
||||
}
|
||||
}
|
||||
f=_1a&&f||op[_15];
|
||||
}else{
|
||||
if(_1c.c!==_18){
|
||||
pos=0;
|
||||
_19=_17[0]._meta;
|
||||
if(_19&&_19.ctor!==_18){
|
||||
_16=_19.chains;
|
||||
if(!_16||_16.constructor!=="manual"){
|
||||
_6("calling chained constructor with inherited");
|
||||
}
|
||||
while(_1a=_17[++pos]){
|
||||
_19=_1a._meta;
|
||||
if(_19&&_19.ctor===_18){
|
||||
break;
|
||||
}
|
||||
}
|
||||
pos=_1a?pos:-1;
|
||||
}
|
||||
}
|
||||
while(_1a=_17[++pos]){
|
||||
_19=_1a._meta;
|
||||
f=_19?_19.ctor:_1a;
|
||||
if(f){
|
||||
break;
|
||||
}
|
||||
}
|
||||
f=_1a&&f;
|
||||
}
|
||||
_1c.c=f;
|
||||
_1c.p=pos;
|
||||
if(f){
|
||||
return a===true?f:f.apply(this,a||_14);
|
||||
}
|
||||
};
|
||||
function _1d(_1e,_1f){
|
||||
if(typeof _1e=="string"){
|
||||
return this.inherited(_1e,_1f,true);
|
||||
}
|
||||
return this.inherited(_1e,true);
|
||||
};
|
||||
function _20(cls){
|
||||
var _21=this.constructor._meta.bases;
|
||||
for(var i=0,l=_21.length;i<l;++i){
|
||||
if(_21[i]===cls){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return this instanceof cls;
|
||||
};
|
||||
function _22(_23,_24){
|
||||
var _25,i=0,l=d._extraNames.length;
|
||||
for(_25 in _24){
|
||||
if(_25!=_5&&_24.hasOwnProperty(_25)){
|
||||
_23[_25]=_24[_25];
|
||||
}
|
||||
}
|
||||
for(;i<l;++i){
|
||||
_25=d._extraNames[i];
|
||||
if(_25!=_5&&_24.hasOwnProperty(_25)){
|
||||
_23[_25]=_24[_25];
|
||||
}
|
||||
}
|
||||
};
|
||||
function _26(_27,_28){
|
||||
var _29,t,i=0,l=d._extraNames.length;
|
||||
for(_29 in _28){
|
||||
t=_28[_29];
|
||||
if((t!==op[_29]||!(_29 in op))&&_29!=_5){
|
||||
if(_2.call(t)=="[object Function]"){
|
||||
t.nom=_29;
|
||||
}
|
||||
_27[_29]=t;
|
||||
}
|
||||
}
|
||||
for(;i<l;++i){
|
||||
_29=d._extraNames[i];
|
||||
t=_28[_29];
|
||||
if((t!==op[_29]||!(_29 in op))&&_29!=_5){
|
||||
if(_2.call(t)=="[object Function]"){
|
||||
t.nom=_29;
|
||||
}
|
||||
_27[_29]=t;
|
||||
}
|
||||
}
|
||||
return _27;
|
||||
};
|
||||
function _2a(_2b){
|
||||
_26(this.prototype,_2b);
|
||||
return this;
|
||||
};
|
||||
function _2c(_2d,_2e){
|
||||
return function(){
|
||||
var a=arguments,_2f=a,a0=a[0],f,i,m,l=_2d.length,_30;
|
||||
if(!(this instanceof a.callee)){
|
||||
return _31(a);
|
||||
}
|
||||
if(_2e&&(a0&&a0.preamble||this.preamble)){
|
||||
_30=new Array(_2d.length);
|
||||
_30[0]=a;
|
||||
for(i=0;;){
|
||||
a0=a[0];
|
||||
if(a0){
|
||||
f=a0.preamble;
|
||||
if(f){
|
||||
a=f.apply(this,a)||a;
|
||||
}
|
||||
}
|
||||
f=_2d[i].prototype;
|
||||
f=f.hasOwnProperty("preamble")&&f.preamble;
|
||||
if(f){
|
||||
a=f.apply(this,a)||a;
|
||||
}
|
||||
if(++i==l){
|
||||
break;
|
||||
}
|
||||
_30[i]=a;
|
||||
}
|
||||
}
|
||||
for(i=l-1;i>=0;--i){
|
||||
f=_2d[i];
|
||||
m=f._meta;
|
||||
f=m?m.ctor:f;
|
||||
if(f){
|
||||
f.apply(this,_30?_30[i]:a);
|
||||
}
|
||||
}
|
||||
f=this.postscript;
|
||||
if(f){
|
||||
f.apply(this,_2f);
|
||||
}
|
||||
};
|
||||
};
|
||||
function _32(_33,_34){
|
||||
return function(){
|
||||
var a=arguments,t=a,a0=a[0],f;
|
||||
if(!(this instanceof a.callee)){
|
||||
return _31(a);
|
||||
}
|
||||
if(_34){
|
||||
if(a0){
|
||||
f=a0.preamble;
|
||||
if(f){
|
||||
t=f.apply(this,t)||t;
|
||||
}
|
||||
}
|
||||
f=this.preamble;
|
||||
if(f){
|
||||
f.apply(this,t);
|
||||
}
|
||||
}
|
||||
if(_33){
|
||||
_33.apply(this,a);
|
||||
}
|
||||
f=this.postscript;
|
||||
if(f){
|
||||
f.apply(this,a);
|
||||
}
|
||||
};
|
||||
};
|
||||
function _35(_36){
|
||||
return function(){
|
||||
var a=arguments,i=0,f,m;
|
||||
if(!(this instanceof a.callee)){
|
||||
return _31(a);
|
||||
}
|
||||
for(;f=_36[i];++i){
|
||||
m=f._meta;
|
||||
f=m?m.ctor:f;
|
||||
if(f){
|
||||
f.apply(this,a);
|
||||
break;
|
||||
}
|
||||
}
|
||||
f=this.postscript;
|
||||
if(f){
|
||||
f.apply(this,a);
|
||||
}
|
||||
};
|
||||
};
|
||||
function _37(_38,_39,_3a){
|
||||
return function(){
|
||||
var b,m,f,i=0,_3b=1;
|
||||
if(_3a){
|
||||
i=_39.length-1;
|
||||
_3b=-1;
|
||||
}
|
||||
for(;b=_39[i];i+=_3b){
|
||||
m=b._meta;
|
||||
f=(m?m.hidden:b.prototype)[_38];
|
||||
if(f){
|
||||
f.apply(this,arguments);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
function _3c(_3d){
|
||||
_3.prototype=_3d.prototype;
|
||||
var t=new _3;
|
||||
_3.prototype=null;
|
||||
return t;
|
||||
};
|
||||
function _31(_3e){
|
||||
var _3f=_3e.callee,t=_3c(_3f);
|
||||
_3f.apply(t,_3e);
|
||||
return t;
|
||||
};
|
||||
d.declare=function(_40,_41,_42){
|
||||
if(typeof _40!="string"){
|
||||
_42=_41;
|
||||
_41=_40;
|
||||
_40="";
|
||||
}
|
||||
_42=_42||{};
|
||||
var _43,i,t,_44,_45,_46,_47,_48=1,_49=_41;
|
||||
if(_2.call(_41)=="[object Array]"){
|
||||
_46=_8(_41);
|
||||
t=_46[0];
|
||||
_48=_46.length-t;
|
||||
_41=_46[_48];
|
||||
}else{
|
||||
_46=[0];
|
||||
if(_41){
|
||||
if(_2.call(_41)=="[object Function]"){
|
||||
t=_41._meta;
|
||||
_46=_46.concat(t?t.bases:_41);
|
||||
}else{
|
||||
_6("base class is not a callable constructor.");
|
||||
}
|
||||
}else{
|
||||
if(_41!==null){
|
||||
_6("unknown base class. Did you use dojo.require to pull it in?");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_41){
|
||||
for(i=_48-1;;--i){
|
||||
_43=_3c(_41);
|
||||
if(!i){
|
||||
break;
|
||||
}
|
||||
t=_46[i];
|
||||
(t._meta?_22:_1)(_43,t.prototype);
|
||||
_44=new Function;
|
||||
_44.superclass=_41;
|
||||
_44.prototype=_43;
|
||||
_41=_43.constructor=_44;
|
||||
}
|
||||
}else{
|
||||
_43={};
|
||||
}
|
||||
_26(_43,_42);
|
||||
t=_42.constructor;
|
||||
if(t!==op.constructor){
|
||||
t.nom=_5;
|
||||
_43.constructor=t;
|
||||
}
|
||||
for(i=_48-1;i;--i){
|
||||
t=_46[i]._meta;
|
||||
if(t&&t.chains){
|
||||
_47=_1(_47||{},t.chains);
|
||||
}
|
||||
}
|
||||
if(_43["-chains-"]){
|
||||
_47=_1(_47||{},_43["-chains-"]);
|
||||
}
|
||||
t=!_47||!_47.hasOwnProperty(_5);
|
||||
_46[0]=_44=(_47&&_47.constructor==="manual")?_35(_46):(_46.length==1?_32(_42.constructor,t):_2c(_46,t));
|
||||
_44._meta={bases:_46,hidden:_42,chains:_47,parents:_49,ctor:_42.constructor};
|
||||
_44.superclass=_41&&_41.prototype;
|
||||
_44.extend=_2a;
|
||||
_44.prototype=_43;
|
||||
_43.constructor=_44;
|
||||
_43.getInherited=_1d;
|
||||
_43.inherited=_13;
|
||||
_43.isInstanceOf=_20;
|
||||
if(_40){
|
||||
_43.declaredClass=_40;
|
||||
d.setObject(_40,_44);
|
||||
}
|
||||
if(_47){
|
||||
for(_45 in _47){
|
||||
if(_43[_45]&&typeof _47[_45]=="string"&&_45!=_5){
|
||||
t=_43[_45]=_37(_45,_46,_47[_45]==="after");
|
||||
t.nom=_45;
|
||||
}
|
||||
}
|
||||
}
|
||||
return _44;
|
||||
};
|
||||
d.safeMixin=_26;
|
||||
})();
|
||||
}
|
||||
359
lib/dojo/_base/event.js
Normal file
359
lib/dojo/_base/event.js
Normal file
@@ -0,0 +1,359 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base.event"]){
|
||||
dojo._hasResource["dojo._base.event"]=true;
|
||||
dojo.provide("dojo._base.event");
|
||||
dojo.require("dojo._base.connect");
|
||||
(function(){
|
||||
var _1=(dojo._event_listener={add:function(_2,_3,fp){
|
||||
if(!_2){
|
||||
return;
|
||||
}
|
||||
_3=_1._normalizeEventName(_3);
|
||||
fp=_1._fixCallback(_3,fp);
|
||||
var _4=_3;
|
||||
if(!dojo.isIE&&(_3=="mouseenter"||_3=="mouseleave")){
|
||||
var _5=fp;
|
||||
_3=(_3=="mouseenter")?"mouseover":"mouseout";
|
||||
fp=function(e){
|
||||
if(!dojo.isDescendant(e.relatedTarget,_2)){
|
||||
return _5.call(this,e);
|
||||
}
|
||||
};
|
||||
}
|
||||
_2.addEventListener(_3,fp,false);
|
||||
return fp;
|
||||
},remove:function(_6,_7,_8){
|
||||
if(_6){
|
||||
_7=_1._normalizeEventName(_7);
|
||||
if(!dojo.isIE&&(_7=="mouseenter"||_7=="mouseleave")){
|
||||
_7=(_7=="mouseenter")?"mouseover":"mouseout";
|
||||
}
|
||||
_6.removeEventListener(_7,_8,false);
|
||||
}
|
||||
},_normalizeEventName:function(_9){
|
||||
return _9.slice(0,2)=="on"?_9.slice(2):_9;
|
||||
},_fixCallback:function(_a,fp){
|
||||
return _a!="keypress"?fp:function(e){
|
||||
return fp.call(this,_1._fixEvent(e,this));
|
||||
};
|
||||
},_fixEvent:function(_b,_c){
|
||||
switch(_b.type){
|
||||
case "keypress":
|
||||
_1._setKeyChar(_b);
|
||||
break;
|
||||
}
|
||||
return _b;
|
||||
},_setKeyChar:function(_d){
|
||||
_d.keyChar=_d.charCode?String.fromCharCode(_d.charCode):"";
|
||||
_d.charOrCode=_d.keyChar||_d.keyCode;
|
||||
},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39}});
|
||||
dojo.fixEvent=function(_e,_f){
|
||||
return _1._fixEvent(_e,_f);
|
||||
};
|
||||
dojo.stopEvent=function(evt){
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
};
|
||||
var _10=dojo._listener;
|
||||
dojo._connect=function(obj,_11,_12,_13,_14){
|
||||
var _15=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);
|
||||
var lid=_15?(_14?2:1):0,l=[dojo._listener,_1,_10][lid];
|
||||
var h=l.add(obj,_11,dojo.hitch(_12,_13));
|
||||
return [obj,_11,h,lid];
|
||||
};
|
||||
dojo._disconnect=function(obj,_16,_17,_18){
|
||||
([dojo._listener,_1,_10][_18]).remove(obj,_16,_17);
|
||||
};
|
||||
dojo.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:dojo.isSafari?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,copyKey:dojo.isMac&&!dojo.isAIR?(dojo.isSafari?91:224):17};
|
||||
var _19=dojo.isMac?"metaKey":"ctrlKey";
|
||||
dojo.isCopyKey=function(e){
|
||||
return e[_19];
|
||||
};
|
||||
if(dojo.isIE){
|
||||
dojo.mouseButtons={LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(e,_1a){
|
||||
return e.button&_1a;
|
||||
},isLeft:function(e){
|
||||
return e.button&1;
|
||||
},isMiddle:function(e){
|
||||
return e.button&4;
|
||||
},isRight:function(e){
|
||||
return e.button&2;
|
||||
}};
|
||||
}else{
|
||||
dojo.mouseButtons={LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(e,_1b){
|
||||
return e.button==_1b;
|
||||
},isLeft:function(e){
|
||||
return e.button==0;
|
||||
},isMiddle:function(e){
|
||||
return e.button==1;
|
||||
},isRight:function(e){
|
||||
return e.button==2;
|
||||
}};
|
||||
}
|
||||
if(dojo.isIE){
|
||||
var _1c=function(e,_1d){
|
||||
try{
|
||||
return (e.keyCode=_1d);
|
||||
}
|
||||
catch(e){
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
var iel=dojo._listener;
|
||||
var _1e=(dojo._ieListenersName="_"+dojo._scopeName+"_listeners");
|
||||
if(!dojo.config._allow_leaks){
|
||||
_10=iel=dojo._ie_listener={handlers:[],add:function(_1f,_20,_21){
|
||||
_1f=_1f||dojo.global;
|
||||
var f=_1f[_20];
|
||||
if(!f||!f[_1e]){
|
||||
var d=dojo._getIeDispatcher();
|
||||
d.target=f&&(ieh.push(f)-1);
|
||||
d[_1e]=[];
|
||||
f=_1f[_20]=d;
|
||||
}
|
||||
return f[_1e].push(ieh.push(_21)-1);
|
||||
},remove:function(_22,_23,_24){
|
||||
var f=(_22||dojo.global)[_23],l=f&&f[_1e];
|
||||
if(f&&l&&_24--){
|
||||
delete ieh[l[_24]];
|
||||
delete l[_24];
|
||||
}
|
||||
}};
|
||||
var ieh=iel.handlers;
|
||||
}
|
||||
dojo.mixin(_1,{add:function(_25,_26,fp){
|
||||
if(!_25){
|
||||
return;
|
||||
}
|
||||
_26=_1._normalizeEventName(_26);
|
||||
if(_26=="onkeypress"){
|
||||
var kd=_25.onkeydown;
|
||||
if(!kd||!kd[_1e]||!kd._stealthKeydownHandle){
|
||||
var h=_1.add(_25,"onkeydown",_1._stealthKeyDown);
|
||||
kd=_25.onkeydown;
|
||||
kd._stealthKeydownHandle=h;
|
||||
kd._stealthKeydownRefs=1;
|
||||
}else{
|
||||
kd._stealthKeydownRefs++;
|
||||
}
|
||||
}
|
||||
return iel.add(_25,_26,_1._fixCallback(fp));
|
||||
},remove:function(_27,_28,_29){
|
||||
_28=_1._normalizeEventName(_28);
|
||||
iel.remove(_27,_28,_29);
|
||||
if(_28=="onkeypress"){
|
||||
var kd=_27.onkeydown;
|
||||
if(--kd._stealthKeydownRefs<=0){
|
||||
iel.remove(_27,"onkeydown",kd._stealthKeydownHandle);
|
||||
delete kd._stealthKeydownHandle;
|
||||
}
|
||||
}
|
||||
},_normalizeEventName:function(_2a){
|
||||
return _2a.slice(0,2)!="on"?"on"+_2a:_2a;
|
||||
},_nop:function(){
|
||||
},_fixEvent:function(evt,_2b){
|
||||
if(!evt){
|
||||
var w=_2b&&(_2b.ownerDocument||_2b.document||_2b).parentWindow||window;
|
||||
evt=w.event;
|
||||
}
|
||||
if(!evt){
|
||||
return (evt);
|
||||
}
|
||||
evt.target=evt.srcElement;
|
||||
evt.currentTarget=(_2b||evt.srcElement);
|
||||
evt.layerX=evt.offsetX;
|
||||
evt.layerY=evt.offsetY;
|
||||
var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;
|
||||
var _2c=((dojo.isIE<6)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;
|
||||
var _2d=dojo._getIeDocumentElementOffset();
|
||||
evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_2c.scrollLeft||0)-_2d.x;
|
||||
evt.pageY=evt.clientY+(_2c.scrollTop||0)-_2d.y;
|
||||
if(evt.type=="mouseover"){
|
||||
evt.relatedTarget=evt.fromElement;
|
||||
}
|
||||
if(evt.type=="mouseout"){
|
||||
evt.relatedTarget=evt.toElement;
|
||||
}
|
||||
evt.stopPropagation=_1._stopPropagation;
|
||||
evt.preventDefault=_1._preventDefault;
|
||||
return _1._fixKeys(evt);
|
||||
},_fixKeys:function(evt){
|
||||
switch(evt.type){
|
||||
case "keypress":
|
||||
var c=("charCode" in evt?evt.charCode:evt.keyCode);
|
||||
if(c==10){
|
||||
c=0;
|
||||
evt.keyCode=13;
|
||||
}else{
|
||||
if(c==13||c==27){
|
||||
c=0;
|
||||
}else{
|
||||
if(c==3){
|
||||
c=99;
|
||||
}
|
||||
}
|
||||
}
|
||||
evt.charCode=c;
|
||||
_1._setKeyChar(evt);
|
||||
break;
|
||||
}
|
||||
return evt;
|
||||
},_stealthKeyDown:function(evt){
|
||||
var kp=evt.currentTarget.onkeypress;
|
||||
if(!kp||!kp[_1e]){
|
||||
return;
|
||||
}
|
||||
var k=evt.keyCode;
|
||||
var _2e=k!=13&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);
|
||||
if(_2e||evt.ctrlKey){
|
||||
var c=_2e?0:k;
|
||||
if(evt.ctrlKey){
|
||||
if(k==3||k==13){
|
||||
return;
|
||||
}else{
|
||||
if(c>95&&c<106){
|
||||
c-=48;
|
||||
}else{
|
||||
if((!evt.shiftKey)&&(c>=65&&c<=90)){
|
||||
c+=32;
|
||||
}else{
|
||||
c=_1._punctMap[c]||c;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var _2f=_1._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});
|
||||
kp.call(evt.currentTarget,_2f);
|
||||
evt.cancelBubble=_2f.cancelBubble;
|
||||
evt.returnValue=_2f.returnValue;
|
||||
_1c(evt,_2f.keyCode);
|
||||
}
|
||||
},_stopPropagation:function(){
|
||||
this.cancelBubble=true;
|
||||
},_preventDefault:function(){
|
||||
this.bubbledKeyCode=this.keyCode;
|
||||
if(this.ctrlKey){
|
||||
_1c(this,0);
|
||||
}
|
||||
this.returnValue=false;
|
||||
}});
|
||||
dojo.stopEvent=function(evt){
|
||||
evt=evt||window.event;
|
||||
_1._stopPropagation.call(evt);
|
||||
_1._preventDefault.call(evt);
|
||||
};
|
||||
}
|
||||
_1._synthesizeEvent=function(evt,_30){
|
||||
var _31=dojo.mixin({},evt,_30);
|
||||
_1._setKeyChar(_31);
|
||||
_31.preventDefault=function(){
|
||||
evt.preventDefault();
|
||||
};
|
||||
_31.stopPropagation=function(){
|
||||
evt.stopPropagation();
|
||||
};
|
||||
return _31;
|
||||
};
|
||||
if(dojo.isOpera){
|
||||
dojo.mixin(_1,{_fixEvent:function(evt,_32){
|
||||
switch(evt.type){
|
||||
case "keypress":
|
||||
var c=evt.which;
|
||||
if(c==3){
|
||||
c=99;
|
||||
}
|
||||
c=c<41&&!evt.shiftKey?0:c;
|
||||
if(evt.ctrlKey&&!evt.shiftKey&&c>=65&&c<=90){
|
||||
c+=32;
|
||||
}
|
||||
return _1._synthesizeEvent(evt,{charCode:c});
|
||||
}
|
||||
return evt;
|
||||
}});
|
||||
}
|
||||
if(dojo.isWebKit){
|
||||
_1._add=_1.add;
|
||||
_1._remove=_1.remove;
|
||||
dojo.mixin(_1,{add:function(_33,_34,fp){
|
||||
if(!_33){
|
||||
return;
|
||||
}
|
||||
var _35=_1._add(_33,_34,fp);
|
||||
if(_1._normalizeEventName(_34)=="keypress"){
|
||||
_35._stealthKeyDownHandle=_1._add(_33,"keydown",function(evt){
|
||||
var k=evt.keyCode;
|
||||
var _36=k!=13&&k!=32&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);
|
||||
if(_36||evt.ctrlKey){
|
||||
var c=_36?0:k;
|
||||
if(evt.ctrlKey){
|
||||
if(k==3||k==13){
|
||||
return;
|
||||
}else{
|
||||
if(c>95&&c<106){
|
||||
c-=48;
|
||||
}else{
|
||||
if(!evt.shiftKey&&c>=65&&c<=90){
|
||||
c+=32;
|
||||
}else{
|
||||
c=_1._punctMap[c]||c;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var _37=_1._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});
|
||||
fp.call(evt.currentTarget,_37);
|
||||
}
|
||||
});
|
||||
}
|
||||
return _35;
|
||||
},remove:function(_38,_39,_3a){
|
||||
if(_38){
|
||||
if(_3a._stealthKeyDownHandle){
|
||||
_1._remove(_38,"keydown",_3a._stealthKeyDownHandle);
|
||||
}
|
||||
_1._remove(_38,_39,_3a);
|
||||
}
|
||||
},_fixEvent:function(evt,_3b){
|
||||
switch(evt.type){
|
||||
case "keypress":
|
||||
if(evt.faux){
|
||||
return evt;
|
||||
}
|
||||
var c=evt.charCode;
|
||||
c=c>=32?c:0;
|
||||
return _1._synthesizeEvent(evt,{charCode:c,faux:true});
|
||||
}
|
||||
return evt;
|
||||
}});
|
||||
}
|
||||
})();
|
||||
if(dojo.isIE){
|
||||
dojo._ieDispatcher=function(_3c,_3d){
|
||||
var ap=Array.prototype,h=dojo._ie_listener.handlers,c=_3c.callee,ls=c[dojo._ieListenersName],t=h[c.target];
|
||||
var r=t&&t.apply(_3d,_3c);
|
||||
var lls=[].concat(ls);
|
||||
for(var i in lls){
|
||||
var f=h[lls[i]];
|
||||
if(!(i in ap)&&f){
|
||||
f.apply(_3d,_3c);
|
||||
}
|
||||
}
|
||||
return r;
|
||||
};
|
||||
dojo._getIeDispatcher=function(){
|
||||
return new Function(dojo._scopeName+"._ieDispatcher(arguments, this)");
|
||||
};
|
||||
dojo._event_listener._fixCallback=function(fp){
|
||||
var f=dojo._event_listener._fixEvent;
|
||||
return function(e){
|
||||
return fp.call(this,f(e,this));
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
302
lib/dojo/_base/fx.js
Normal file
302
lib/dojo/_base/fx.js
Normal file
@@ -0,0 +1,302 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base.fx"]){
|
||||
dojo._hasResource["dojo._base.fx"]=true;
|
||||
dojo.provide("dojo._base.fx");
|
||||
dojo.require("dojo._base.Color");
|
||||
dojo.require("dojo._base.connect");
|
||||
dojo.require("dojo._base.lang");
|
||||
dojo.require("dojo._base.html");
|
||||
(function(){
|
||||
var d=dojo;
|
||||
var _1=d._mixin;
|
||||
dojo._Line=function(_2,_3){
|
||||
this.start=_2;
|
||||
this.end=_3;
|
||||
};
|
||||
dojo._Line.prototype.getValue=function(n){
|
||||
return ((this.end-this.start)*n)+this.start;
|
||||
};
|
||||
dojo.Animation=function(_4){
|
||||
_1(this,_4);
|
||||
if(d.isArray(this.curve)){
|
||||
this.curve=new d._Line(this.curve[0],this.curve[1]);
|
||||
}
|
||||
};
|
||||
d._Animation=d.Animation;
|
||||
d.extend(dojo.Animation,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){
|
||||
var _5=this._percent,_6=this.easing;
|
||||
return _6?_6(_5):_5;
|
||||
},_fire:function(_7,_8){
|
||||
var a=_8||[];
|
||||
if(this[_7]){
|
||||
if(d.config.debugAtAllCosts){
|
||||
this[_7].apply(this,a);
|
||||
}else{
|
||||
try{
|
||||
this[_7].apply(this,a);
|
||||
}
|
||||
catch(e){
|
||||
console.error("exception in animation handler for:",_7);
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
return this;
|
||||
},play:function(_9,_a){
|
||||
var _b=this;
|
||||
if(_b._delayTimer){
|
||||
_b._clearTimer();
|
||||
}
|
||||
if(_a){
|
||||
_b._stopTimer();
|
||||
_b._active=_b._paused=false;
|
||||
_b._percent=0;
|
||||
}else{
|
||||
if(_b._active&&!_b._paused){
|
||||
return _b;
|
||||
}
|
||||
}
|
||||
_b._fire("beforeBegin",[_b.node]);
|
||||
var de=_9||_b.delay,_c=dojo.hitch(_b,"_play",_a);
|
||||
if(de>0){
|
||||
_b._delayTimer=setTimeout(_c,de);
|
||||
return _b;
|
||||
}
|
||||
_c();
|
||||
return _b;
|
||||
},_play:function(_d){
|
||||
var _e=this;
|
||||
if(_e._delayTimer){
|
||||
_e._clearTimer();
|
||||
}
|
||||
_e._startTime=new Date().valueOf();
|
||||
if(_e._paused){
|
||||
_e._startTime-=_e.duration*_e._percent;
|
||||
}
|
||||
_e._active=true;
|
||||
_e._paused=false;
|
||||
var _f=_e.curve.getValue(_e._getStep());
|
||||
if(!_e._percent){
|
||||
if(!_e._startRepeatCount){
|
||||
_e._startRepeatCount=_e.repeat;
|
||||
}
|
||||
_e._fire("onBegin",[_f]);
|
||||
}
|
||||
_e._fire("onPlay",[_f]);
|
||||
_e._cycle();
|
||||
return _e;
|
||||
},pause:function(){
|
||||
var _10=this;
|
||||
if(_10._delayTimer){
|
||||
_10._clearTimer();
|
||||
}
|
||||
_10._stopTimer();
|
||||
if(!_10._active){
|
||||
return _10;
|
||||
}
|
||||
_10._paused=true;
|
||||
_10._fire("onPause",[_10.curve.getValue(_10._getStep())]);
|
||||
return _10;
|
||||
},gotoPercent:function(_11,_12){
|
||||
var _13=this;
|
||||
_13._stopTimer();
|
||||
_13._active=_13._paused=true;
|
||||
_13._percent=_11;
|
||||
if(_12){
|
||||
_13.play();
|
||||
}
|
||||
return _13;
|
||||
},stop:function(_14){
|
||||
var _15=this;
|
||||
if(_15._delayTimer){
|
||||
_15._clearTimer();
|
||||
}
|
||||
if(!_15._timer){
|
||||
return _15;
|
||||
}
|
||||
_15._stopTimer();
|
||||
if(_14){
|
||||
_15._percent=1;
|
||||
}
|
||||
_15._fire("onStop",[_15.curve.getValue(_15._getStep())]);
|
||||
_15._active=_15._paused=false;
|
||||
return _15;
|
||||
},status:function(){
|
||||
if(this._active){
|
||||
return this._paused?"paused":"playing";
|
||||
}
|
||||
return "stopped";
|
||||
},_cycle:function(){
|
||||
var _16=this;
|
||||
if(_16._active){
|
||||
var _17=new Date().valueOf();
|
||||
var _18=(_17-_16._startTime)/(_16.duration);
|
||||
if(_18>=1){
|
||||
_18=1;
|
||||
}
|
||||
_16._percent=_18;
|
||||
if(_16.easing){
|
||||
_18=_16.easing(_18);
|
||||
}
|
||||
_16._fire("onAnimate",[_16.curve.getValue(_18)]);
|
||||
if(_16._percent<1){
|
||||
_16._startTimer();
|
||||
}else{
|
||||
_16._active=false;
|
||||
if(_16.repeat>0){
|
||||
_16.repeat--;
|
||||
_16.play(null,true);
|
||||
}else{
|
||||
if(_16.repeat==-1){
|
||||
_16.play(null,true);
|
||||
}else{
|
||||
if(_16._startRepeatCount){
|
||||
_16.repeat=_16._startRepeatCount;
|
||||
_16._startRepeatCount=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
_16._percent=0;
|
||||
_16._fire("onEnd",[_16.node]);
|
||||
!_16.repeat&&_16._stopTimer();
|
||||
}
|
||||
}
|
||||
return _16;
|
||||
},_clearTimer:function(){
|
||||
clearTimeout(this._delayTimer);
|
||||
delete this._delayTimer;
|
||||
}});
|
||||
var ctr=0,_19=null,_1a={run:function(){
|
||||
}};
|
||||
d.extend(d.Animation,{_startTimer:function(){
|
||||
if(!this._timer){
|
||||
this._timer=d.connect(_1a,"run",this,"_cycle");
|
||||
ctr++;
|
||||
}
|
||||
if(!_19){
|
||||
_19=setInterval(d.hitch(_1a,"run"),this.rate);
|
||||
}
|
||||
},_stopTimer:function(){
|
||||
if(this._timer){
|
||||
d.disconnect(this._timer);
|
||||
this._timer=null;
|
||||
ctr--;
|
||||
}
|
||||
if(ctr<=0){
|
||||
clearInterval(_19);
|
||||
_19=null;
|
||||
ctr=0;
|
||||
}
|
||||
}});
|
||||
var _1b=d.isIE?function(_1c){
|
||||
var ns=_1c.style;
|
||||
if(!ns.width.length&&d.style(_1c,"width")=="auto"){
|
||||
ns.width="auto";
|
||||
}
|
||||
}:function(){
|
||||
};
|
||||
dojo._fade=function(_1d){
|
||||
_1d.node=d.byId(_1d.node);
|
||||
var _1e=_1({properties:{}},_1d),_1f=(_1e.properties.opacity={});
|
||||
_1f.start=!("start" in _1e)?function(){
|
||||
return +d.style(_1e.node,"opacity")||0;
|
||||
}:_1e.start;
|
||||
_1f.end=_1e.end;
|
||||
var _20=d.animateProperty(_1e);
|
||||
d.connect(_20,"beforeBegin",d.partial(_1b,_1e.node));
|
||||
return _20;
|
||||
};
|
||||
dojo.fadeIn=function(_21){
|
||||
return d._fade(_1({end:1},_21));
|
||||
};
|
||||
dojo.fadeOut=function(_22){
|
||||
return d._fade(_1({end:0},_22));
|
||||
};
|
||||
dojo._defaultEasing=function(n){
|
||||
return 0.5+((Math.sin((n+1.5)*Math.PI))/2);
|
||||
};
|
||||
var _23=function(_24){
|
||||
this._properties=_24;
|
||||
for(var p in _24){
|
||||
var _25=_24[p];
|
||||
if(_25.start instanceof d.Color){
|
||||
_25.tempColor=new d.Color();
|
||||
}
|
||||
}
|
||||
};
|
||||
_23.prototype.getValue=function(r){
|
||||
var ret={};
|
||||
for(var p in this._properties){
|
||||
var _26=this._properties[p],_27=_26.start;
|
||||
if(_27 instanceof d.Color){
|
||||
ret[p]=d.blendColors(_27,_26.end,r,_26.tempColor).toCss();
|
||||
}else{
|
||||
if(!d.isArray(_27)){
|
||||
ret[p]=((_26.end-_27)*r)+_27+(p!="opacity"?_26.units||"px":0);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
dojo.animateProperty=function(_28){
|
||||
var n=_28.node=d.byId(_28.node);
|
||||
if(!_28.easing){
|
||||
_28.easing=d._defaultEasing;
|
||||
}
|
||||
var _29=new d.Animation(_28);
|
||||
d.connect(_29,"beforeBegin",_29,function(){
|
||||
var pm={};
|
||||
for(var p in this.properties){
|
||||
if(p=="width"||p=="height"){
|
||||
this.node.display="block";
|
||||
}
|
||||
var _2a=this.properties[p];
|
||||
if(d.isFunction(_2a)){
|
||||
_2a=_2a(n);
|
||||
}
|
||||
_2a=pm[p]=_1({},(d.isObject(_2a)?_2a:{end:_2a}));
|
||||
if(d.isFunction(_2a.start)){
|
||||
_2a.start=_2a.start(n);
|
||||
}
|
||||
if(d.isFunction(_2a.end)){
|
||||
_2a.end=_2a.end(n);
|
||||
}
|
||||
var _2b=(p.toLowerCase().indexOf("color")>=0);
|
||||
function _2c(_2d,p){
|
||||
var v={height:_2d.offsetHeight,width:_2d.offsetWidth}[p];
|
||||
if(v!==undefined){
|
||||
return v;
|
||||
}
|
||||
v=d.style(_2d,p);
|
||||
return (p=="opacity")?+v:(_2b?v:parseFloat(v));
|
||||
};
|
||||
if(!("end" in _2a)){
|
||||
_2a.end=_2c(n,p);
|
||||
}else{
|
||||
if(!("start" in _2a)){
|
||||
_2a.start=_2c(n,p);
|
||||
}
|
||||
}
|
||||
if(_2b){
|
||||
_2a.start=new d.Color(_2a.start);
|
||||
_2a.end=new d.Color(_2a.end);
|
||||
}else{
|
||||
_2a.start=(p=="opacity")?+_2a.start:parseFloat(_2a.start);
|
||||
}
|
||||
}
|
||||
this.curve=new _23(pm);
|
||||
});
|
||||
d.connect(_29,"onAnimate",d.hitch(d,"style",_29.node));
|
||||
return _29;
|
||||
};
|
||||
dojo.anim=function(_2e,_2f,_30,_31,_32,_33){
|
||||
return d.animateProperty({node:_2e,duration:_30||d.Animation.prototype.duration,properties:_2f,easing:_31,onEnd:_32}).play(_33||0);
|
||||
};
|
||||
})();
|
||||
}
|
||||
749
lib/dojo/_base/html.js
Normal file
749
lib/dojo/_base/html.js
Normal file
@@ -0,0 +1,749 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base.html"]){
|
||||
dojo._hasResource["dojo._base.html"]=true;
|
||||
dojo.require("dojo._base.lang");
|
||||
dojo.provide("dojo._base.html");
|
||||
try{
|
||||
document.execCommand("BackgroundImageCache",false,true);
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
if(dojo.isIE||dojo.isOpera){
|
||||
dojo.byId=function(id,_1){
|
||||
if(typeof id!="string"){
|
||||
return id;
|
||||
}
|
||||
var _2=_1||dojo.doc,te=_2.getElementById(id);
|
||||
if(te&&(te.attributes.id.value==id||te.id==id)){
|
||||
return te;
|
||||
}else{
|
||||
var _3=_2.all[id];
|
||||
if(!_3||_3.nodeName){
|
||||
_3=[_3];
|
||||
}
|
||||
var i=0;
|
||||
while((te=_3[i++])){
|
||||
if((te.attributes&&te.attributes.id&&te.attributes.id.value==id)||te.id==id){
|
||||
return te;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}else{
|
||||
dojo.byId=function(id,_4){
|
||||
return (typeof id=="string")?(_4||dojo.doc).getElementById(id):id;
|
||||
};
|
||||
}
|
||||
(function(){
|
||||
var d=dojo;
|
||||
var _5=d.byId;
|
||||
var _6=null,_7;
|
||||
d.addOnWindowUnload(function(){
|
||||
_6=null;
|
||||
});
|
||||
dojo._destroyElement=dojo.destroy=function(_8){
|
||||
_8=_5(_8);
|
||||
try{
|
||||
var _9=_8.ownerDocument;
|
||||
if(!_6||_7!=_9){
|
||||
_6=_9.createElement("div");
|
||||
_7=_9;
|
||||
}
|
||||
_6.appendChild(_8.parentNode?_8.parentNode.removeChild(_8):_8);
|
||||
_6.innerHTML="";
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
};
|
||||
dojo.isDescendant=function(_a,_b){
|
||||
try{
|
||||
_a=_5(_a);
|
||||
_b=_5(_b);
|
||||
while(_a){
|
||||
if(_a==_b){
|
||||
return true;
|
||||
}
|
||||
_a=_a.parentNode;
|
||||
}
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
return false;
|
||||
};
|
||||
dojo.setSelectable=function(_c,_d){
|
||||
_c=_5(_c);
|
||||
if(d.isMozilla){
|
||||
_c.style.MozUserSelect=_d?"":"none";
|
||||
}else{
|
||||
if(d.isKhtml||d.isWebKit){
|
||||
_c.style.KhtmlUserSelect=_d?"auto":"none";
|
||||
}else{
|
||||
if(d.isIE){
|
||||
var v=(_c.unselectable=_d?"":"on");
|
||||
d.query("*",_c).forEach("item.unselectable = '"+v+"'");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
var _e=function(_f,ref){
|
||||
var _10=ref.parentNode;
|
||||
if(_10){
|
||||
_10.insertBefore(_f,ref);
|
||||
}
|
||||
};
|
||||
var _11=function(_12,ref){
|
||||
var _13=ref.parentNode;
|
||||
if(_13){
|
||||
if(_13.lastChild==ref){
|
||||
_13.appendChild(_12);
|
||||
}else{
|
||||
_13.insertBefore(_12,ref.nextSibling);
|
||||
}
|
||||
}
|
||||
};
|
||||
dojo.place=function(_14,_15,_16){
|
||||
_15=_5(_15);
|
||||
if(typeof _14=="string"){
|
||||
_14=_14.charAt(0)=="<"?d._toDom(_14,_15.ownerDocument):_5(_14);
|
||||
}
|
||||
if(typeof _16=="number"){
|
||||
var cn=_15.childNodes;
|
||||
if(!cn.length||cn.length<=_16){
|
||||
_15.appendChild(_14);
|
||||
}else{
|
||||
_e(_14,cn[_16<0?0:_16]);
|
||||
}
|
||||
}else{
|
||||
switch(_16){
|
||||
case "before":
|
||||
_e(_14,_15);
|
||||
break;
|
||||
case "after":
|
||||
_11(_14,_15);
|
||||
break;
|
||||
case "replace":
|
||||
_15.parentNode.replaceChild(_14,_15);
|
||||
break;
|
||||
case "only":
|
||||
d.empty(_15);
|
||||
_15.appendChild(_14);
|
||||
break;
|
||||
case "first":
|
||||
if(_15.firstChild){
|
||||
_e(_14,_15.firstChild);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
_15.appendChild(_14);
|
||||
}
|
||||
}
|
||||
return _14;
|
||||
};
|
||||
dojo.boxModel="content-box";
|
||||
if(d.isIE){
|
||||
d.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";
|
||||
}
|
||||
var gcs;
|
||||
if(d.isWebKit){
|
||||
gcs=function(_17){
|
||||
var s;
|
||||
if(_17.nodeType==1){
|
||||
var dv=_17.ownerDocument.defaultView;
|
||||
s=dv.getComputedStyle(_17,null);
|
||||
if(!s&&_17.style){
|
||||
_17.style.display="";
|
||||
s=dv.getComputedStyle(_17,null);
|
||||
}
|
||||
}
|
||||
return s||{};
|
||||
};
|
||||
}else{
|
||||
if(d.isIE){
|
||||
gcs=function(_18){
|
||||
return _18.nodeType==1?_18.currentStyle:{};
|
||||
};
|
||||
}else{
|
||||
gcs=function(_19){
|
||||
return _19.nodeType==1?_19.ownerDocument.defaultView.getComputedStyle(_19,null):{};
|
||||
};
|
||||
}
|
||||
}
|
||||
dojo.getComputedStyle=gcs;
|
||||
if(!d.isIE){
|
||||
d._toPixelValue=function(_1a,_1b){
|
||||
return parseFloat(_1b)||0;
|
||||
};
|
||||
}else{
|
||||
d._toPixelValue=function(_1c,_1d){
|
||||
if(!_1d){
|
||||
return 0;
|
||||
}
|
||||
if(_1d=="medium"){
|
||||
return 4;
|
||||
}
|
||||
if(_1d.slice&&_1d.slice(-2)=="px"){
|
||||
return parseFloat(_1d);
|
||||
}
|
||||
with(_1c){
|
||||
var _1e=style.left;
|
||||
var _1f=runtimeStyle.left;
|
||||
runtimeStyle.left=currentStyle.left;
|
||||
try{
|
||||
style.left=_1d;
|
||||
_1d=style.pixelLeft;
|
||||
}
|
||||
catch(e){
|
||||
_1d=0;
|
||||
}
|
||||
style.left=_1e;
|
||||
runtimeStyle.left=_1f;
|
||||
}
|
||||
return _1d;
|
||||
};
|
||||
}
|
||||
var px=d._toPixelValue;
|
||||
var _20="DXImageTransform.Microsoft.Alpha";
|
||||
var af=function(n,f){
|
||||
try{
|
||||
return n.filters.item(_20);
|
||||
}
|
||||
catch(e){
|
||||
return f?{}:null;
|
||||
}
|
||||
};
|
||||
dojo._getOpacity=d.isIE?function(_21){
|
||||
try{
|
||||
return af(_21).Opacity/100;
|
||||
}
|
||||
catch(e){
|
||||
return 1;
|
||||
}
|
||||
}:function(_22){
|
||||
return gcs(_22).opacity;
|
||||
};
|
||||
dojo._setOpacity=d.isIE?function(_23,_24){
|
||||
var ov=_24*100,_25=_24==1;
|
||||
_23.style.zoom=_25?"":1;
|
||||
if(!af(_23)){
|
||||
if(_25){
|
||||
return _24;
|
||||
}
|
||||
_23.style.filter+=" progid:"+_20+"(Opacity="+ov+")";
|
||||
}else{
|
||||
af(_23,1).Opacity=ov;
|
||||
}
|
||||
af(_23,1).Enabled=!_25;
|
||||
if(_23.nodeName.toLowerCase()=="tr"){
|
||||
d.query("> td",_23).forEach(function(i){
|
||||
d._setOpacity(i,_24);
|
||||
});
|
||||
}
|
||||
return _24;
|
||||
}:function(_26,_27){
|
||||
return _26.style.opacity=_27;
|
||||
};
|
||||
var _28={left:true,top:true};
|
||||
var _29=/margin|padding|width|height|max|min|offset/;
|
||||
var _2a=function(_2b,_2c,_2d){
|
||||
_2c=_2c.toLowerCase();
|
||||
if(d.isIE){
|
||||
if(_2d=="auto"){
|
||||
if(_2c=="height"){
|
||||
return _2b.offsetHeight;
|
||||
}
|
||||
if(_2c=="width"){
|
||||
return _2b.offsetWidth;
|
||||
}
|
||||
}
|
||||
if(_2c=="fontweight"){
|
||||
switch(_2d){
|
||||
case 700:
|
||||
return "bold";
|
||||
case 400:
|
||||
default:
|
||||
return "normal";
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!(_2c in _28)){
|
||||
_28[_2c]=_29.test(_2c);
|
||||
}
|
||||
return _28[_2c]?px(_2b,_2d):_2d;
|
||||
};
|
||||
var _2e=d.isIE?"styleFloat":"cssFloat",_2f={"cssFloat":_2e,"styleFloat":_2e,"float":_2e};
|
||||
dojo.style=function(_30,_31,_32){
|
||||
var n=_5(_30),_33=arguments.length,op=(_31=="opacity");
|
||||
_31=_2f[_31]||_31;
|
||||
if(_33==3){
|
||||
return op?d._setOpacity(n,_32):n.style[_31]=_32;
|
||||
}
|
||||
if(_33==2&&op){
|
||||
return d._getOpacity(n);
|
||||
}
|
||||
var s=gcs(n);
|
||||
if(_33==2&&typeof _31!="string"){
|
||||
for(var x in _31){
|
||||
d.style(_30,x,_31[x]);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
return (_33==1)?s:_2a(n,_31,s[_31]||n.style[_31]);
|
||||
};
|
||||
dojo._getPadExtents=function(n,_34){
|
||||
var s=_34||gcs(n),l=px(n,s.paddingLeft),t=px(n,s.paddingTop);
|
||||
return {l:l,t:t,w:l+px(n,s.paddingRight),h:t+px(n,s.paddingBottom)};
|
||||
};
|
||||
dojo._getBorderExtents=function(n,_35){
|
||||
var ne="none",s=_35||gcs(n),bl=(s.borderLeftStyle!=ne?px(n,s.borderLeftWidth):0),bt=(s.borderTopStyle!=ne?px(n,s.borderTopWidth):0);
|
||||
return {l:bl,t:bt,w:bl+(s.borderRightStyle!=ne?px(n,s.borderRightWidth):0),h:bt+(s.borderBottomStyle!=ne?px(n,s.borderBottomWidth):0)};
|
||||
};
|
||||
dojo._getPadBorderExtents=function(n,_36){
|
||||
var s=_36||gcs(n),p=d._getPadExtents(n,s),b=d._getBorderExtents(n,s);
|
||||
return {l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h};
|
||||
};
|
||||
dojo._getMarginExtents=function(n,_37){
|
||||
var s=_37||gcs(n),l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);
|
||||
if(d.isWebKit&&(s.position!="absolute")){
|
||||
r=l;
|
||||
}
|
||||
return {l:l,t:t,w:l+r,h:t+b};
|
||||
};
|
||||
dojo._getMarginBox=function(_38,_39){
|
||||
var s=_39||gcs(_38),me=d._getMarginExtents(_38,s);
|
||||
var l=_38.offsetLeft-me.l,t=_38.offsetTop-me.t,p=_38.parentNode;
|
||||
if(d.isMoz){
|
||||
var sl=parseFloat(s.left),st=parseFloat(s.top);
|
||||
if(!isNaN(sl)&&!isNaN(st)){
|
||||
l=sl,t=st;
|
||||
}else{
|
||||
if(p&&p.style){
|
||||
var pcs=gcs(p);
|
||||
if(pcs.overflow!="visible"){
|
||||
var be=d._getBorderExtents(p,pcs);
|
||||
l+=be.l,t+=be.t;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(d.isOpera||(d.isIE>7&&!d.isQuirks)){
|
||||
if(p){
|
||||
be=d._getBorderExtents(p);
|
||||
l-=be.l;
|
||||
t-=be.t;
|
||||
}
|
||||
}
|
||||
}
|
||||
return {l:l,t:t,w:_38.offsetWidth+me.w,h:_38.offsetHeight+me.h};
|
||||
};
|
||||
dojo._getContentBox=function(_3a,_3b){
|
||||
var s=_3b||gcs(_3a),pe=d._getPadExtents(_3a,s),be=d._getBorderExtents(_3a,s),w=_3a.clientWidth,h;
|
||||
if(!w){
|
||||
w=_3a.offsetWidth,h=_3a.offsetHeight;
|
||||
}else{
|
||||
h=_3a.clientHeight,be.w=be.h=0;
|
||||
}
|
||||
if(d.isOpera){
|
||||
pe.l+=be.l;
|
||||
pe.t+=be.t;
|
||||
}
|
||||
return {l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h};
|
||||
};
|
||||
dojo._getBorderBox=function(_3c,_3d){
|
||||
var s=_3d||gcs(_3c),pe=d._getPadExtents(_3c,s),cb=d._getContentBox(_3c,s);
|
||||
return {l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h};
|
||||
};
|
||||
dojo._setBox=function(_3e,l,t,w,h,u){
|
||||
u=u||"px";
|
||||
var s=_3e.style;
|
||||
if(!isNaN(l)){
|
||||
s.left=l+u;
|
||||
}
|
||||
if(!isNaN(t)){
|
||||
s.top=t+u;
|
||||
}
|
||||
if(w>=0){
|
||||
s.width=w+u;
|
||||
}
|
||||
if(h>=0){
|
||||
s.height=h+u;
|
||||
}
|
||||
};
|
||||
dojo._isButtonTag=function(_3f){
|
||||
return _3f.tagName=="BUTTON"||_3f.tagName=="INPUT"&&(_3f.getAttribute("type")||"").toUpperCase()=="BUTTON";
|
||||
};
|
||||
dojo._usesBorderBox=function(_40){
|
||||
var n=_40.tagName;
|
||||
return d.boxModel=="border-box"||n=="TABLE"||d._isButtonTag(_40);
|
||||
};
|
||||
dojo._setContentSize=function(_41,_42,_43,_44){
|
||||
if(d._usesBorderBox(_41)){
|
||||
var pb=d._getPadBorderExtents(_41,_44);
|
||||
if(_42>=0){
|
||||
_42+=pb.w;
|
||||
}
|
||||
if(_43>=0){
|
||||
_43+=pb.h;
|
||||
}
|
||||
}
|
||||
d._setBox(_41,NaN,NaN,_42,_43);
|
||||
};
|
||||
dojo._setMarginBox=function(_45,_46,_47,_48,_49,_4a){
|
||||
var s=_4a||gcs(_45),bb=d._usesBorderBox(_45),pb=bb?_4b:d._getPadBorderExtents(_45,s);
|
||||
if(d.isWebKit){
|
||||
if(d._isButtonTag(_45)){
|
||||
var ns=_45.style;
|
||||
if(_48>=0&&!ns.width){
|
||||
ns.width="4px";
|
||||
}
|
||||
if(_49>=0&&!ns.height){
|
||||
ns.height="4px";
|
||||
}
|
||||
}
|
||||
}
|
||||
var mb=d._getMarginExtents(_45,s);
|
||||
if(_48>=0){
|
||||
_48=Math.max(_48-pb.w-mb.w,0);
|
||||
}
|
||||
if(_49>=0){
|
||||
_49=Math.max(_49-pb.h-mb.h,0);
|
||||
}
|
||||
d._setBox(_45,_46,_47,_48,_49);
|
||||
};
|
||||
var _4b={l:0,t:0,w:0,h:0};
|
||||
dojo.marginBox=function(_4c,box){
|
||||
var n=_5(_4c),s=gcs(n),b=box;
|
||||
return !b?d._getMarginBox(n,s):d._setMarginBox(n,b.l,b.t,b.w,b.h,s);
|
||||
};
|
||||
dojo.contentBox=function(_4d,box){
|
||||
var n=_5(_4d),s=gcs(n),b=box;
|
||||
return !b?d._getContentBox(n,s):d._setContentSize(n,b.w,b.h,s);
|
||||
};
|
||||
var _4e=function(_4f,_50){
|
||||
if(!(_4f=(_4f||0).parentNode)){
|
||||
return 0;
|
||||
}
|
||||
var val,_51=0,_52=d.body();
|
||||
while(_4f&&_4f.style){
|
||||
if(gcs(_4f).position=="fixed"){
|
||||
return 0;
|
||||
}
|
||||
val=_4f[_50];
|
||||
if(val){
|
||||
_51+=val-0;
|
||||
if(_4f==_52){
|
||||
break;
|
||||
}
|
||||
}
|
||||
_4f=_4f.parentNode;
|
||||
}
|
||||
return _51;
|
||||
};
|
||||
dojo._docScroll=function(){
|
||||
var n=d.global;
|
||||
return "pageXOffset" in n?{x:n.pageXOffset,y:n.pageYOffset}:(n=d.doc.documentElement,n.clientHeight?{x:d._fixIeBiDiScrollLeft(n.scrollLeft),y:n.scrollTop}:(n=d.body(),{x:n.scrollLeft||0,y:n.scrollTop||0}));
|
||||
};
|
||||
dojo._isBodyLtr=function(){
|
||||
return "_bodyLtr" in d?d._bodyLtr:d._bodyLtr=(d.body().dir||d.doc.documentElement.dir||"ltr").toLowerCase()=="ltr";
|
||||
};
|
||||
dojo._getIeDocumentElementOffset=function(){
|
||||
var de=d.doc.documentElement;
|
||||
if(d.isIE<8){
|
||||
var r=de.getBoundingClientRect();
|
||||
var l=r.left,t=r.top;
|
||||
if(d.isIE<7){
|
||||
l+=de.clientLeft;
|
||||
t+=de.clientTop;
|
||||
}
|
||||
return {x:l<0?0:l,y:t<0?0:t};
|
||||
}else{
|
||||
return {x:0,y:0};
|
||||
}
|
||||
};
|
||||
dojo._fixIeBiDiScrollLeft=function(_53){
|
||||
var dd=d.doc;
|
||||
if(d.isIE<8&&!d._isBodyLtr()){
|
||||
var de=d.isQuirks?dd.body:dd.documentElement;
|
||||
return _53+de.clientWidth-de.scrollWidth;
|
||||
}
|
||||
return _53;
|
||||
};
|
||||
dojo._abs=dojo.position=function(_54,_55){
|
||||
var db=d.body(),dh=db.parentNode,ret;
|
||||
_54=_5(_54);
|
||||
if(_54["getBoundingClientRect"]){
|
||||
ret=_54.getBoundingClientRect();
|
||||
ret={x:ret.left,y:ret.top,w:ret.right-ret.left,h:ret.bottom-ret.top};
|
||||
if(d.isIE){
|
||||
var _56=d._getIeDocumentElementOffset();
|
||||
ret.x-=_56.x+(d.isQuirks?db.clientLeft+db.offsetLeft:0);
|
||||
ret.y-=_56.y+(d.isQuirks?db.clientTop+db.offsetTop:0);
|
||||
}else{
|
||||
if(d.isFF==3){
|
||||
var cs=gcs(dh);
|
||||
ret.x-=px(dh,cs.marginLeft)+px(dh,cs.borderLeftWidth);
|
||||
ret.y-=px(dh,cs.marginTop)+px(dh,cs.borderTopWidth);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
ret={x:0,y:0,w:_54.offsetWidth,h:_54.offsetHeight};
|
||||
if(_54["offsetParent"]){
|
||||
ret.x-=_4e(_54,"scrollLeft");
|
||||
ret.y-=_4e(_54,"scrollTop");
|
||||
var _57=_54;
|
||||
do{
|
||||
var n=_57.offsetLeft,t=_57.offsetTop;
|
||||
ret.x+=isNaN(n)?0:n;
|
||||
ret.y+=isNaN(t)?0:t;
|
||||
cs=gcs(_57);
|
||||
if(_57!=_54){
|
||||
if(d.isMoz){
|
||||
ret.x+=2*px(_57,cs.borderLeftWidth);
|
||||
ret.y+=2*px(_57,cs.borderTopWidth);
|
||||
}else{
|
||||
ret.x+=px(_57,cs.borderLeftWidth);
|
||||
ret.y+=px(_57,cs.borderTopWidth);
|
||||
}
|
||||
}
|
||||
if(d.isMoz&&cs.position=="static"){
|
||||
var _58=_57.parentNode;
|
||||
while(_58!=_57.offsetParent){
|
||||
var pcs=gcs(_58);
|
||||
if(pcs.position=="static"){
|
||||
ret.x+=px(_57,pcs.borderLeftWidth);
|
||||
ret.y+=px(_57,pcs.borderTopWidth);
|
||||
}
|
||||
_58=_58.parentNode;
|
||||
}
|
||||
}
|
||||
_57=_57.offsetParent;
|
||||
}while((_57!=dh)&&_57);
|
||||
}else{
|
||||
if(_54.x&&_54.y){
|
||||
ret.x+=isNaN(_54.x)?0:_54.x;
|
||||
ret.y+=isNaN(_54.y)?0:_54.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_55){
|
||||
var _59=d._docScroll();
|
||||
ret.x+=_59.x;
|
||||
ret.y+=_59.y;
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
dojo.coords=function(_5a,_5b){
|
||||
var n=_5(_5a),s=gcs(n),mb=d._getMarginBox(n,s);
|
||||
var abs=d.position(n,_5b);
|
||||
mb.x=abs.x;
|
||||
mb.y=abs.y;
|
||||
return mb;
|
||||
};
|
||||
var _5c={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"},_5d={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"},_5e={innerHTML:1,className:1,htmlFor:d.isIE,value:1};
|
||||
var _5f=function(_60){
|
||||
return _5d[_60.toLowerCase()]||_60;
|
||||
};
|
||||
var _61=function(_62,_63){
|
||||
var _64=_62.getAttributeNode&&_62.getAttributeNode(_63);
|
||||
return _64&&_64.specified;
|
||||
};
|
||||
dojo.hasAttr=function(_65,_66){
|
||||
var lc=_66.toLowerCase();
|
||||
return _5e[_5c[lc]||_66]||_61(_5(_65),_5d[lc]||_66);
|
||||
};
|
||||
var _67={},_68=0,_69=dojo._scopeName+"attrid",_6a={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};
|
||||
dojo.attr=function(_6b,_6c,_6d){
|
||||
_6b=_5(_6b);
|
||||
var _6e=arguments.length,_6f;
|
||||
if(_6e==2&&typeof _6c!="string"){
|
||||
for(var x in _6c){
|
||||
d.attr(_6b,x,_6c[x]);
|
||||
}
|
||||
return _6b;
|
||||
}
|
||||
var lc=_6c.toLowerCase(),_70=_5c[lc]||_6c,_71=_5e[_70],_72=_5d[lc]||_6c;
|
||||
if(_6e==3){
|
||||
do{
|
||||
if(_70=="style"&&typeof _6d!="string"){
|
||||
d.style(_6b,_6d);
|
||||
break;
|
||||
}
|
||||
if(_70=="innerHTML"){
|
||||
if(d.isIE&&_6b.tagName.toLowerCase() in _6a){
|
||||
d.empty(_6b);
|
||||
_6b.appendChild(d._toDom(_6d,_6b.ownerDocument));
|
||||
}else{
|
||||
_6b[_70]=_6d;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if(d.isFunction(_6d)){
|
||||
var _73=d.attr(_6b,_69);
|
||||
if(!_73){
|
||||
_73=_68++;
|
||||
d.attr(_6b,_69,_73);
|
||||
}
|
||||
if(!_67[_73]){
|
||||
_67[_73]={};
|
||||
}
|
||||
var h=_67[_73][_70];
|
||||
if(h){
|
||||
d.disconnect(h);
|
||||
}else{
|
||||
try{
|
||||
delete _6b[_70];
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
}
|
||||
_67[_73][_70]=d.connect(_6b,_70,_6d);
|
||||
break;
|
||||
}
|
||||
if(_71||typeof _6d=="boolean"){
|
||||
_6b[_70]=_6d;
|
||||
break;
|
||||
}
|
||||
_6b.setAttribute(_72,_6d);
|
||||
}while(false);
|
||||
return _6b;
|
||||
}
|
||||
_6d=_6b[_70];
|
||||
if(_71&&typeof _6d!="undefined"){
|
||||
return _6d;
|
||||
}
|
||||
if(_70!="href"&&(typeof _6d=="boolean"||d.isFunction(_6d))){
|
||||
return _6d;
|
||||
}
|
||||
return _61(_6b,_72)?_6b.getAttribute(_72):null;
|
||||
};
|
||||
dojo.removeAttr=function(_74,_75){
|
||||
_5(_74).removeAttribute(_5f(_75));
|
||||
};
|
||||
dojo.getNodeProp=function(_76,_77){
|
||||
_76=_5(_76);
|
||||
var lc=_77.toLowerCase(),_78=_5c[lc]||_77;
|
||||
if((_78 in _76)&&_78!="href"){
|
||||
return _76[_78];
|
||||
}
|
||||
var _79=_5d[lc]||_77;
|
||||
return _61(_76,_79)?_76.getAttribute(_79):null;
|
||||
};
|
||||
dojo.create=function(tag,_7a,_7b,pos){
|
||||
var doc=d.doc;
|
||||
if(_7b){
|
||||
_7b=_5(_7b);
|
||||
doc=_7b.ownerDocument;
|
||||
}
|
||||
if(typeof tag=="string"){
|
||||
tag=doc.createElement(tag);
|
||||
}
|
||||
if(_7a){
|
||||
d.attr(tag,_7a);
|
||||
}
|
||||
if(_7b){
|
||||
d.place(tag,_7b,pos);
|
||||
}
|
||||
return tag;
|
||||
};
|
||||
d.empty=d.isIE?function(_7c){
|
||||
_7c=_5(_7c);
|
||||
for(var c;c=_7c.lastChild;){
|
||||
d.destroy(c);
|
||||
}
|
||||
}:function(_7d){
|
||||
_5(_7d).innerHTML="";
|
||||
};
|
||||
var _7e={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},_7f=/<\s*([\w\:]+)/,_80={},_81=0,_82="__"+d._scopeName+"ToDomId";
|
||||
for(var _83 in _7e){
|
||||
var tw=_7e[_83];
|
||||
tw.pre=_83=="option"?"<select multiple=\"multiple\">":"<"+tw.join("><")+">";
|
||||
tw.post="</"+tw.reverse().join("></")+">";
|
||||
}
|
||||
d._toDom=function(_84,doc){
|
||||
doc=doc||d.doc;
|
||||
var _85=doc[_82];
|
||||
if(!_85){
|
||||
doc[_82]=_85=++_81+"";
|
||||
_80[_85]=doc.createElement("div");
|
||||
}
|
||||
_84+="";
|
||||
var _86=_84.match(_7f),tag=_86?_86[1].toLowerCase():"",_87=_80[_85],_88,i,fc,df;
|
||||
if(_86&&_7e[tag]){
|
||||
_88=_7e[tag];
|
||||
_87.innerHTML=_88.pre+_84+_88.post;
|
||||
for(i=_88.length;i;--i){
|
||||
_87=_87.firstChild;
|
||||
}
|
||||
}else{
|
||||
_87.innerHTML=_84;
|
||||
}
|
||||
if(_87.childNodes.length==1){
|
||||
return _87.removeChild(_87.firstChild);
|
||||
}
|
||||
df=doc.createDocumentFragment();
|
||||
while(fc=_87.firstChild){
|
||||
df.appendChild(fc);
|
||||
}
|
||||
return df;
|
||||
};
|
||||
var _89="className";
|
||||
dojo.hasClass=function(_8a,_8b){
|
||||
return ((" "+_5(_8a)[_89]+" ").indexOf(" "+_8b+" ")>=0);
|
||||
};
|
||||
var _8c=/\s+/,a1=[""],_8d=function(s){
|
||||
if(typeof s=="string"||s instanceof String){
|
||||
if(s.indexOf(" ")<0){
|
||||
a1[0]=s;
|
||||
return a1;
|
||||
}else{
|
||||
return s.split(_8c);
|
||||
}
|
||||
}
|
||||
return s||"";
|
||||
};
|
||||
dojo.addClass=function(_8e,_8f){
|
||||
_8e=_5(_8e);
|
||||
_8f=_8d(_8f);
|
||||
var cls=_8e[_89],_90;
|
||||
cls=cls?" "+cls+" ":" ";
|
||||
_90=cls.length;
|
||||
for(var i=0,len=_8f.length,c;i<len;++i){
|
||||
c=_8f[i];
|
||||
if(c&&cls.indexOf(" "+c+" ")<0){
|
||||
cls+=c+" ";
|
||||
}
|
||||
}
|
||||
if(_90<cls.length){
|
||||
_8e[_89]=cls.substr(1,cls.length-2);
|
||||
}
|
||||
};
|
||||
dojo.removeClass=function(_91,_92){
|
||||
_91=_5(_91);
|
||||
var cls;
|
||||
if(_92!==undefined){
|
||||
_92=_8d(_92);
|
||||
cls=" "+_91[_89]+" ";
|
||||
for(var i=0,len=_92.length;i<len;++i){
|
||||
cls=cls.replace(" "+_92[i]+" "," ");
|
||||
}
|
||||
cls=d.trim(cls);
|
||||
}else{
|
||||
cls="";
|
||||
}
|
||||
if(_91[_89]!=cls){
|
||||
_91[_89]=cls;
|
||||
}
|
||||
};
|
||||
dojo.toggleClass=function(_93,_94,_95){
|
||||
if(_95===undefined){
|
||||
_95=!d.hasClass(_93,_94);
|
||||
}
|
||||
d[_95?"addClass":"removeClass"](_93,_94);
|
||||
};
|
||||
})();
|
||||
}
|
||||
81
lib/dojo/_base/json.js
Normal file
81
lib/dojo/_base/json.js
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base.json"]){
|
||||
dojo._hasResource["dojo._base.json"]=true;
|
||||
dojo.provide("dojo._base.json");
|
||||
dojo.fromJson=function(_1){
|
||||
return eval("("+_1+")");
|
||||
};
|
||||
dojo._escapeString=function(_2){
|
||||
return ("\""+_2.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");
|
||||
};
|
||||
dojo.toJsonIndentStr="\t";
|
||||
dojo.toJson=function(it,_3,_4){
|
||||
if(it===undefined){
|
||||
return "undefined";
|
||||
}
|
||||
var _5=typeof it;
|
||||
if(_5=="number"||_5=="boolean"){
|
||||
return it+"";
|
||||
}
|
||||
if(it===null){
|
||||
return "null";
|
||||
}
|
||||
if(dojo.isString(it)){
|
||||
return dojo._escapeString(it);
|
||||
}
|
||||
var _6=arguments.callee;
|
||||
var _7;
|
||||
_4=_4||"";
|
||||
var _8=_3?_4+dojo.toJsonIndentStr:"";
|
||||
var tf=it.__json__||it.json;
|
||||
if(dojo.isFunction(tf)){
|
||||
_7=tf.call(it);
|
||||
if(it!==_7){
|
||||
return _6(_7,_3,_8);
|
||||
}
|
||||
}
|
||||
if(it.nodeType&&it.cloneNode){
|
||||
throw new Error("Can't serialize DOM nodes");
|
||||
}
|
||||
var _9=_3?" ":"";
|
||||
var _a=_3?"\n":"";
|
||||
if(dojo.isArray(it)){
|
||||
var _b=dojo.map(it,function(_c){
|
||||
var _d=_6(_c,_3,_8);
|
||||
if(typeof _d!="string"){
|
||||
_d="undefined";
|
||||
}
|
||||
return _a+_8+_d;
|
||||
});
|
||||
return "["+_b.join(","+_9)+_a+_4+"]";
|
||||
}
|
||||
if(_5=="function"){
|
||||
return null;
|
||||
}
|
||||
var _e=[],_f;
|
||||
for(_f in it){
|
||||
var _10,val;
|
||||
if(typeof _f=="number"){
|
||||
_10="\""+_f+"\"";
|
||||
}else{
|
||||
if(typeof _f=="string"){
|
||||
_10=dojo._escapeString(_f);
|
||||
}else{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
val=_6(it[_f],_3,_8);
|
||||
if(typeof val!="string"){
|
||||
continue;
|
||||
}
|
||||
_e.push(_a+_8+_10+":"+_9+val);
|
||||
}
|
||||
return "{"+_e.join(","+_9)+_a+_4+"}";
|
||||
};
|
||||
}
|
||||
148
lib/dojo/_base/lang.js
Normal file
148
lib/dojo/_base/lang.js
Normal file
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base.lang"]){
|
||||
dojo._hasResource["dojo._base.lang"]=true;
|
||||
dojo.provide("dojo._base.lang");
|
||||
(function(){
|
||||
var d=dojo,_1=Object.prototype.toString;
|
||||
dojo.isString=function(it){
|
||||
return (typeof it=="string"||it instanceof String);
|
||||
};
|
||||
dojo.isArray=function(it){
|
||||
return it&&(it instanceof Array||typeof it=="array");
|
||||
};
|
||||
dojo.isFunction=function(it){
|
||||
return _1.call(it)==="[object Function]";
|
||||
};
|
||||
dojo.isObject=function(it){
|
||||
return it!==undefined&&(it===null||typeof it=="object"||d.isArray(it)||d.isFunction(it));
|
||||
};
|
||||
dojo.isArrayLike=function(it){
|
||||
return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length));
|
||||
};
|
||||
dojo.isAlien=function(it){
|
||||
return it&&!d.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));
|
||||
};
|
||||
dojo.extend=function(_2,_3){
|
||||
for(var i=1,l=arguments.length;i<l;i++){
|
||||
d._mixin(_2.prototype,arguments[i]);
|
||||
}
|
||||
return _2;
|
||||
};
|
||||
dojo._hitchArgs=function(_4,_5){
|
||||
var _6=d._toArray(arguments,2);
|
||||
var _7=d.isString(_5);
|
||||
return function(){
|
||||
var _8=d._toArray(arguments);
|
||||
var f=_7?(_4||d.global)[_5]:_5;
|
||||
return f&&f.apply(_4||this,_6.concat(_8));
|
||||
};
|
||||
};
|
||||
dojo.hitch=function(_9,_a){
|
||||
if(arguments.length>2){
|
||||
return d._hitchArgs.apply(d,arguments);
|
||||
}
|
||||
if(!_a){
|
||||
_a=_9;
|
||||
_9=null;
|
||||
}
|
||||
if(d.isString(_a)){
|
||||
_9=_9||d.global;
|
||||
if(!_9[_a]){
|
||||
throw (["dojo.hitch: scope[\"",_a,"\"] is null (scope=\"",_9,"\")"].join(""));
|
||||
}
|
||||
return function(){
|
||||
return _9[_a].apply(_9,arguments||[]);
|
||||
};
|
||||
}
|
||||
return !_9?_a:function(){
|
||||
return _a.apply(_9,arguments||[]);
|
||||
};
|
||||
};
|
||||
dojo.delegate=dojo._delegate=(function(){
|
||||
function _b(){
|
||||
};
|
||||
return function(_c,_d){
|
||||
_b.prototype=_c;
|
||||
var _e=new _b();
|
||||
_b.prototype=null;
|
||||
if(_d){
|
||||
d._mixin(_e,_d);
|
||||
}
|
||||
return _e;
|
||||
};
|
||||
})();
|
||||
var _f=function(obj,_10,_11){
|
||||
return (_11||[]).concat(Array.prototype.slice.call(obj,_10||0));
|
||||
};
|
||||
var _12=function(obj,_13,_14){
|
||||
var arr=_14||[];
|
||||
for(var x=_13||0;x<obj.length;x++){
|
||||
arr.push(obj[x]);
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
dojo._toArray=d.isIE?function(obj){
|
||||
return ((obj.item)?_12:_f).apply(this,arguments);
|
||||
}:_f;
|
||||
dojo.partial=function(_15){
|
||||
var arr=[null];
|
||||
return d.hitch.apply(d,arr.concat(d._toArray(arguments)));
|
||||
};
|
||||
var _16=d._extraNames,_17=_16.length,_18={};
|
||||
dojo.clone=function(o){
|
||||
if(!o||typeof o!="object"||d.isFunction(o)){
|
||||
return o;
|
||||
}
|
||||
if(o.nodeType&&"cloneNode" in o){
|
||||
return o.cloneNode(true);
|
||||
}
|
||||
if(o instanceof Date){
|
||||
return new Date(o.getTime());
|
||||
}
|
||||
var r,i,l,s,_19;
|
||||
if(d.isArray(o)){
|
||||
r=[];
|
||||
for(i=0,l=o.length;i<l;++i){
|
||||
if(i in o){
|
||||
r.push(d.clone(o[i]));
|
||||
}
|
||||
}
|
||||
}else{
|
||||
r=o.constructor?new o.constructor():{};
|
||||
}
|
||||
for(_19 in o){
|
||||
s=o[_19];
|
||||
if(!(_19 in r)||(r[_19]!==s&&(!(_19 in _18)||_18[_19]!==s))){
|
||||
r[_19]=d.clone(s);
|
||||
}
|
||||
}
|
||||
if(_17){
|
||||
for(i=0;i<_17;++i){
|
||||
_19=_16[i];
|
||||
s=o[_19];
|
||||
if(!(_19 in r)||(r[_19]!==s&&(!(_19 in _18)||_18[_19]!==s))){
|
||||
r[_19]=s;
|
||||
}
|
||||
}
|
||||
}
|
||||
return r;
|
||||
};
|
||||
dojo.trim=String.prototype.trim?function(str){
|
||||
return str.trim();
|
||||
}:function(str){
|
||||
return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");
|
||||
};
|
||||
var _1a=/\{([^\}]+)\}/g;
|
||||
dojo.replace=function(_1b,map,_1c){
|
||||
return _1b.replace(_1c||_1a,d.isFunction(map)?map:function(_1d,k){
|
||||
return d.getObject(k,false,map);
|
||||
});
|
||||
};
|
||||
})();
|
||||
}
|
||||
628
lib/dojo/_base/query-sizzle.js
Normal file
628
lib/dojo/_base/query-sizzle.js
Normal file
@@ -0,0 +1,628 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base.query"]){
|
||||
dojo._hasResource["dojo._base.query"]=true;
|
||||
if(typeof dojo!="undefined"){
|
||||
dojo.provide("dojo._base.query");
|
||||
dojo.require("dojo._base.NodeList");
|
||||
dojo.query=function(_1,_2,_3){
|
||||
_3=_3||dojo.NodeList;
|
||||
if(!_1){
|
||||
return new _3();
|
||||
}
|
||||
if(_1.constructor==_3){
|
||||
return _1;
|
||||
}
|
||||
if(!dojo.isString(_1)){
|
||||
return new _3(_1);
|
||||
}
|
||||
if(dojo.isString(_2)){
|
||||
_2=dojo.byId(_2);
|
||||
if(!_2){
|
||||
return new _3();
|
||||
}
|
||||
}
|
||||
return dojo.Sizzle(_1,_2,new _3());
|
||||
};
|
||||
dojo._filterQueryResult=function(_4,_5){
|
||||
return dojo.Sizzle.filter(_5,_4);
|
||||
};
|
||||
}
|
||||
(function(ns){
|
||||
var _6=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|[^[\]]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,_7=0,_8=Object.prototype.toString;
|
||||
var _9=function(_a,_b,_c,_d){
|
||||
_c=_c||[];
|
||||
_b=_b||document;
|
||||
if(_b.nodeType!==1&&_b.nodeType!==9){
|
||||
return [];
|
||||
}
|
||||
if(!_a||typeof _a!=="string"){
|
||||
return _c;
|
||||
}
|
||||
var _e=[],m,_f,_10,_11,_12,_13,_14=true;
|
||||
_6.lastIndex=0;
|
||||
while((m=_6.exec(_a))!==null){
|
||||
_e.push(m[1]);
|
||||
if(m[2]){
|
||||
_13=RegExp.rightContext;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(_e.length>1&&_15.match.POS.exec(_a)){
|
||||
if(_e.length===2&&_15.relative[_e[0]]){
|
||||
var _16="",_17;
|
||||
while((_17=_15.match.POS.exec(_a))){
|
||||
_16+=_17[0];
|
||||
_a=_a.replace(_15.match.POS,"");
|
||||
}
|
||||
_f=_9.filter(_16,_9(_a,_b));
|
||||
}else{
|
||||
_f=_15.relative[_e[0]]?[_b]:_9(_e.shift(),_b);
|
||||
while(_e.length){
|
||||
var _18=[];
|
||||
_a=_e.shift();
|
||||
if(_15.relative[_a]){
|
||||
_a+=_e.shift();
|
||||
}
|
||||
for(var i=0,l=_f.length;i<l;i++){
|
||||
_9(_a,_f[i],_18);
|
||||
}
|
||||
_f=_18;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
var ret=_d?{expr:_e.pop(),set:_19(_d)}:_9.find(_e.pop(),_e.length===1&&_b.parentNode?_b.parentNode:_b);
|
||||
_f=_9.filter(ret.expr,ret.set);
|
||||
if(_e.length>0){
|
||||
_10=_19(_f);
|
||||
}else{
|
||||
_14=false;
|
||||
}
|
||||
while(_e.length){
|
||||
var cur=_e.pop(),pop=cur;
|
||||
if(!_15.relative[cur]){
|
||||
cur="";
|
||||
}else{
|
||||
pop=_e.pop();
|
||||
}
|
||||
if(pop==null){
|
||||
pop=_b;
|
||||
}
|
||||
_15.relative[cur](_10,pop);
|
||||
}
|
||||
}
|
||||
if(!_10){
|
||||
_10=_f;
|
||||
}
|
||||
if(!_10){
|
||||
throw "Syntax error, unrecognized expression: "+(cur||_a);
|
||||
}
|
||||
if(_8.call(_10)==="[object Array]"){
|
||||
if(!_14){
|
||||
_c.push.apply(_c,_10);
|
||||
}else{
|
||||
if(_b.nodeType===1){
|
||||
for(var i=0;_10[i]!=null;i++){
|
||||
if(_10[i]&&(_10[i]===true||_10[i].nodeType===1&&_1a(_b,_10[i]))){
|
||||
_c.push(_f[i]);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
for(var i=0;_10[i]!=null;i++){
|
||||
if(_10[i]&&_10[i].nodeType===1){
|
||||
_c.push(_f[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
_19(_10,_c);
|
||||
}
|
||||
if(_13){
|
||||
_9(_13,_b,_c,_d);
|
||||
}
|
||||
return _c;
|
||||
};
|
||||
_9.matches=function(_1b,set){
|
||||
return _9(_1b,null,null,set);
|
||||
};
|
||||
_9.find=function(_1c,_1d){
|
||||
var set,_1e;
|
||||
if(!_1c){
|
||||
return [];
|
||||
}
|
||||
for(var i=0,l=_15.order.length;i<l;i++){
|
||||
var _1f=_15.order[i],_1e;
|
||||
if((_1e=_15.match[_1f].exec(_1c))){
|
||||
var _20=RegExp.leftContext;
|
||||
if(_20.substr(_20.length-1)!=="\\"){
|
||||
_1e[1]=(_1e[1]||"").replace(/\\/g,"");
|
||||
set=_15.find[_1f](_1e,_1d);
|
||||
if(set!=null){
|
||||
_1c=_1c.replace(_15.match[_1f],"");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!set){
|
||||
set=_1d.getElementsByTagName("*");
|
||||
}
|
||||
return {set:set,expr:_1c};
|
||||
};
|
||||
_9.filter=function(_21,set,_22,not){
|
||||
var old=_21,_23=[],_24=set,_25,_26;
|
||||
while(_21&&set.length){
|
||||
for(var _27 in _15.filter){
|
||||
if((_25=_15.match[_27].exec(_21))!=null){
|
||||
var _28=_15.filter[_27],_29=null,_2a=0,_2b,_2c;
|
||||
_26=false;
|
||||
if(_24==_23){
|
||||
_23=[];
|
||||
}
|
||||
if(_15.preFilter[_27]){
|
||||
_25=_15.preFilter[_27](_25,_24,_22,_23,not);
|
||||
if(!_25){
|
||||
_26=_2b=true;
|
||||
}else{
|
||||
if(_25[0]===true){
|
||||
_29=[];
|
||||
var _2d=null,_2e;
|
||||
for(var i=0;(_2e=_24[i])!==undefined;i++){
|
||||
if(_2e&&_2d!==_2e){
|
||||
_29.push(_2e);
|
||||
_2d=_2e;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_25){
|
||||
for(var i=0;(_2c=_24[i])!==undefined;i++){
|
||||
if(_2c){
|
||||
if(_29&&_2c!=_29[_2a]){
|
||||
_2a++;
|
||||
}
|
||||
_2b=_28(_2c,_25,_2a,_29);
|
||||
var _2f=not^!!_2b;
|
||||
if(_22&&_2b!=null){
|
||||
if(_2f){
|
||||
_26=true;
|
||||
}else{
|
||||
_24[i]=false;
|
||||
}
|
||||
}else{
|
||||
if(_2f){
|
||||
_23.push(_2c);
|
||||
_26=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_2b!==undefined){
|
||||
if(!_22){
|
||||
_24=_23;
|
||||
}
|
||||
_21=_21.replace(_15.match[_27],"");
|
||||
if(!_26){
|
||||
return [];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
_21=_21.replace(/\s*,\s*/,"");
|
||||
if(_21==old){
|
||||
if(_26==null){
|
||||
throw "Syntax error, unrecognized expression: "+_21;
|
||||
}else{
|
||||
break;
|
||||
}
|
||||
}
|
||||
old=_21;
|
||||
}
|
||||
return _24;
|
||||
};
|
||||
var _15=_9.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u0128-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u0128-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u0128-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[((?:[\w\u0128-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\]/,TAG:/^((?:[\w\u0128-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child\(?(even|odd|[\dn+-]*)\)?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)\(?(\d*)\)?(?:[^-]|$)/,PSEUDO:/:((?:[\w\u0128-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},relative:{"+":function(_30,_31){
|
||||
for(var i=0,l=_30.length;i<l;i++){
|
||||
var _32=_30[i];
|
||||
if(_32){
|
||||
var cur=_32.previousSibling;
|
||||
while(cur&&cur.nodeType!==1){
|
||||
cur=cur.previousSibling;
|
||||
}
|
||||
_30[i]=typeof _31==="string"?cur||false:cur===_31;
|
||||
}
|
||||
}
|
||||
if(typeof _31==="string"){
|
||||
_9.filter(_31,_30,true);
|
||||
}
|
||||
},">":function(_33,_34){
|
||||
if(typeof _34==="string"&&!/\W/.test(_34)){
|
||||
_34=_34.toUpperCase();
|
||||
for(var i=0,l=_33.length;i<l;i++){
|
||||
var _35=_33[i];
|
||||
if(_35){
|
||||
var _36=_35.parentNode;
|
||||
_33[i]=_36.nodeName===_34?_36:false;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
for(var i=0,l=_33.length;i<l;i++){
|
||||
var _35=_33[i];
|
||||
if(_35){
|
||||
_33[i]=typeof _34==="string"?_35.parentNode:_35.parentNode===_34;
|
||||
}
|
||||
}
|
||||
if(typeof _34==="string"){
|
||||
_9.filter(_34,_33,true);
|
||||
}
|
||||
}
|
||||
},"":function(_37,_38){
|
||||
var _39="done"+(_7++),_3a=_3b;
|
||||
if(!_38.match(/\W/)){
|
||||
var _3c=_38=_38.toUpperCase();
|
||||
_3a=_3d;
|
||||
}
|
||||
_3a("parentNode",_38,_39,_37,_3c);
|
||||
},"~":function(_3e,_3f){
|
||||
var _40="done"+(_7++),_41=_3b;
|
||||
if(typeof _3f==="string"&&!_3f.match(/\W/)){
|
||||
var _42=_3f=_3f.toUpperCase();
|
||||
_41=_3d;
|
||||
}
|
||||
_41("previousSibling",_3f,_40,_3e,_42);
|
||||
}},find:{ID:function(_43,_44){
|
||||
if(_44.getElementById){
|
||||
var m=_44.getElementById(_43[1]);
|
||||
return m?[m]:[];
|
||||
}
|
||||
},NAME:function(_45,_46){
|
||||
return _46.getElementsByName?_46.getElementsByName(_45[1]):null;
|
||||
},TAG:function(_47,_48){
|
||||
return _48.getElementsByTagName(_47[1]);
|
||||
}},preFilter:{CLASS:function(_49,_4a,_4b,_4c,not){
|
||||
_49=" "+_49[1].replace(/\\/g,"")+" ";
|
||||
for(var i=0;_4a[i];i++){
|
||||
if(not^(" "+_4a[i].className+" ").indexOf(_49)>=0){
|
||||
if(!_4b){
|
||||
_4c.push(_4a[i]);
|
||||
}
|
||||
}else{
|
||||
if(_4b){
|
||||
_4a[i]=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},ID:function(_4d){
|
||||
return _4d[1];
|
||||
},TAG:function(_4e){
|
||||
return _4e[1].toUpperCase();
|
||||
},CHILD:function(_4f){
|
||||
if(_4f[1]=="nth"){
|
||||
var _50=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(_4f[2]=="even"&&"2n"||_4f[2]=="odd"&&"2n+1"||!/\D/.test(_4f[2])&&"0n+"+_4f[2]||_4f[2]);
|
||||
_4f[2]=(_50[1]+(_50[2]||1))-0;
|
||||
_4f[3]=_50[3]-0;
|
||||
}
|
||||
_4f[0]="done"+(_7++);
|
||||
return _4f;
|
||||
},ATTR:function(_51){
|
||||
var _52=_51[1];
|
||||
if(_15.attrMap[_52]){
|
||||
_51[1]=_15.attrMap[_52];
|
||||
}
|
||||
if(_51[2]==="~="){
|
||||
_51[4]=" "+_51[4]+" ";
|
||||
}
|
||||
return _51;
|
||||
},PSEUDO:function(_53,_54,_55,_56,not){
|
||||
if(_53[1]==="not"){
|
||||
if(_53[3].match(_6).length>1){
|
||||
_53[3]=_9(_53[3],null,null,_54);
|
||||
}else{
|
||||
var ret=_9.filter(_53[3],_54,_55,true^not);
|
||||
if(!_55){
|
||||
_56.push.apply(_56,ret);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return _53;
|
||||
},POS:function(_57){
|
||||
_57.unshift(true);
|
||||
return _57;
|
||||
}},filters:{enabled:function(_58){
|
||||
return _58.disabled===false&&_58.type!=="hidden";
|
||||
},disabled:function(_59){
|
||||
return _59.disabled===true;
|
||||
},checked:function(_5a){
|
||||
return _5a.checked===true;
|
||||
},selected:function(_5b){
|
||||
_5b.parentNode.selectedIndex;
|
||||
return _5b.selected===true;
|
||||
},parent:function(_5c){
|
||||
return !!_5c.firstChild;
|
||||
},empty:function(_5d){
|
||||
return !_5d.firstChild;
|
||||
},has:function(_5e,i,_5f){
|
||||
return !!_9(_5f[3],_5e).length;
|
||||
},header:function(_60){
|
||||
return /h\d/i.test(_60.nodeName);
|
||||
},text:function(_61){
|
||||
return "text"===_61.type;
|
||||
},radio:function(_62){
|
||||
return "radio"===_62.type;
|
||||
},checkbox:function(_63){
|
||||
return "checkbox"===_63.type;
|
||||
},file:function(_64){
|
||||
return "file"===_64.type;
|
||||
},password:function(_65){
|
||||
return "password"===_65.type;
|
||||
},submit:function(_66){
|
||||
return "submit"===_66.type;
|
||||
},image:function(_67){
|
||||
return "image"===_67.type;
|
||||
},reset:function(_68){
|
||||
return "reset"===_68.type;
|
||||
},button:function(_69){
|
||||
return "button"===_69.type||_69.nodeName.toUpperCase()==="BUTTON";
|
||||
},input:function(_6a){
|
||||
return /input|select|textarea|button/i.test(_6a.nodeName);
|
||||
}},setFilters:{first:function(_6b,i){
|
||||
return i===0;
|
||||
},last:function(_6c,i,_6d,_6e){
|
||||
return i===_6e.length-1;
|
||||
},even:function(_6f,i){
|
||||
return i%2===0;
|
||||
},odd:function(_70,i){
|
||||
return i%2===1;
|
||||
},lt:function(_71,i,_72){
|
||||
return i<_72[3]-0;
|
||||
},gt:function(_73,i,_74){
|
||||
return i>_74[3]-0;
|
||||
},nth:function(_75,i,_76){
|
||||
return _76[3]-0==i;
|
||||
},eq:function(_77,i,_78){
|
||||
return _78[3]-0==i;
|
||||
}},filter:{CHILD:function(_79,_7a){
|
||||
var _7b=_7a[1],_7c=_79.parentNode;
|
||||
var _7d=_7a[0];
|
||||
if(_7c&&!_7c[_7d]){
|
||||
var _7e=1;
|
||||
for(var _7f=_7c.firstChild;_7f;_7f=_7f.nextSibling){
|
||||
if(_7f.nodeType==1){
|
||||
_7f.nodeIndex=_7e++;
|
||||
}
|
||||
}
|
||||
_7c[_7d]=_7e-1;
|
||||
}
|
||||
if(_7b=="first"){
|
||||
return _79.nodeIndex==1;
|
||||
}else{
|
||||
if(_7b=="last"){
|
||||
return _79.nodeIndex==_7c[_7d];
|
||||
}else{
|
||||
if(_7b=="only"){
|
||||
return _7c[_7d]==1;
|
||||
}else{
|
||||
if(_7b=="nth"){
|
||||
var add=false,_80=_7a[2],_81=_7a[3];
|
||||
if(_80==1&&_81==0){
|
||||
return true;
|
||||
}
|
||||
if(_80==0){
|
||||
if(_79.nodeIndex==_81){
|
||||
add=true;
|
||||
}
|
||||
}else{
|
||||
if((_79.nodeIndex-_81)%_80==0&&(_79.nodeIndex-_81)/_80>=0){
|
||||
add=true;
|
||||
}
|
||||
}
|
||||
return add;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},PSEUDO:function(_82,_83,i,_84){
|
||||
var _85=_83[1],_86=_15.filters[_85];
|
||||
if(_86){
|
||||
return _86(_82,i,_83,_84);
|
||||
}else{
|
||||
if(_85==="contains"){
|
||||
return (_82.textContent||_82.innerText||"").indexOf(_83[3])>=0;
|
||||
}else{
|
||||
if(_85==="not"){
|
||||
var not=_83[3];
|
||||
for(var i=0,l=not.length;i<l;i++){
|
||||
if(not[i]===_82){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},ID:function(_87,_88){
|
||||
return _87.nodeType===1&&_87.getAttribute("id")===_88;
|
||||
},TAG:function(_89,_8a){
|
||||
return (_8a==="*"&&_89.nodeType===1)||_89.nodeName===_8a;
|
||||
},CLASS:function(_8b,_8c){
|
||||
return _8c.test(_8b.className);
|
||||
},ATTR:function(_8d,_8e){
|
||||
var _8f=_8d[_8e[1]]||_8d.getAttribute(_8e[1]),_90=_8f+"",_91=_8e[2],_92=_8e[4];
|
||||
return _8f==null?false:_91==="="?_90===_92:_91==="*="?_90.indexOf(_92)>=0:_91==="~="?(" "+_90+" ").indexOf(_92)>=0:!_8e[4]?_8f:_91==="!="?_90!=_92:_91==="^="?_90.indexOf(_92)===0:_91==="$="?_90.substr(_90.length-_92.length)===_92:_91==="|="?_90===_92||_90.substr(0,_92.length+1)===_92+"-":false;
|
||||
},POS:function(_93,_94,i,_95){
|
||||
var _96=_94[2],_97=_15.setFilters[_96];
|
||||
if(_97){
|
||||
return _97(_93,i,_94,_95);
|
||||
}
|
||||
}}};
|
||||
for(var _98 in _15.match){
|
||||
_15.match[_98]=RegExp(_15.match[_98].source+/(?![^\[]*\])(?![^\(]*\))/.source);
|
||||
}
|
||||
var _19=function(_99,_9a){
|
||||
_99=Array.prototype.slice.call(_99);
|
||||
if(_9a){
|
||||
_9a.push.apply(_9a,_99);
|
||||
return _9a;
|
||||
}
|
||||
return _99;
|
||||
};
|
||||
try{
|
||||
Array.prototype.slice.call(document.documentElement.childNodes);
|
||||
}
|
||||
catch(e){
|
||||
_19=function(_9b,_9c){
|
||||
var ret=_9c||[];
|
||||
if(_8.call(_9b)==="[object Array]"){
|
||||
Array.prototype.push.apply(ret,_9b);
|
||||
}else{
|
||||
if(typeof _9b.length==="number"){
|
||||
for(var i=0,l=_9b.length;i<l;i++){
|
||||
ret.push(_9b[i]);
|
||||
}
|
||||
}else{
|
||||
for(var i=0;_9b[i];i++){
|
||||
ret.push(_9b[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
}
|
||||
(function(){
|
||||
var _9d=document.createElement("form"),id="script"+(new Date).getTime();
|
||||
_9d.innerHTML="<input name='"+id+"'/>";
|
||||
var _9e=document.documentElement;
|
||||
_9e.insertBefore(_9d,_9e.firstChild);
|
||||
if(!!document.getElementById(id)){
|
||||
_15.find.ID=function(_9f,_a0){
|
||||
if(_a0.getElementById){
|
||||
var m=_a0.getElementById(_9f[1]);
|
||||
return m?m.id===_9f[1]||m.getAttributeNode&&m.getAttributeNode("id").nodeValue===_9f[1]?[m]:undefined:[];
|
||||
}
|
||||
};
|
||||
_15.filter.ID=function(_a1,_a2){
|
||||
var _a3=_a1.getAttributeNode&&_a1.getAttributeNode("id");
|
||||
return _a1.nodeType===1&&_a3&&_a3.nodeValue===_a2;
|
||||
};
|
||||
}
|
||||
_9e.removeChild(_9d);
|
||||
})();
|
||||
(function(){
|
||||
var div=document.createElement("div");
|
||||
div.appendChild(document.createComment(""));
|
||||
if(div.getElementsByTagName("*").length>0){
|
||||
_15.find.TAG=function(_a4,_a5){
|
||||
var _a6=_a5.getElementsByTagName(_a4[1]);
|
||||
if(_a4[1]==="*"){
|
||||
var tmp=[];
|
||||
for(var i=0;_a6[i];i++){
|
||||
if(_a6[i].nodeType===1){
|
||||
tmp.push(_a6[i]);
|
||||
}
|
||||
}
|
||||
_a6=tmp;
|
||||
}
|
||||
return _a6;
|
||||
};
|
||||
}
|
||||
})();
|
||||
if(document.querySelectorAll){
|
||||
(function(){
|
||||
var _a7=_9;
|
||||
_9=function(_a8,_a9,_aa,_ab){
|
||||
_a9=_a9||document;
|
||||
if(!_ab&&_a9.nodeType===9){
|
||||
try{
|
||||
return _19(_a9.querySelectorAll(_a8),_aa);
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
}
|
||||
return _a7(_a8,_a9,_aa,_ab);
|
||||
};
|
||||
_9.find=_a7.find;
|
||||
_9.filter=_a7.filter;
|
||||
_9.selectors=_a7.selectors;
|
||||
_9.matches=_a7.matches;
|
||||
})();
|
||||
}
|
||||
if(document.documentElement.getElementsByClassName){
|
||||
_15.order.splice(1,0,"CLASS");
|
||||
_15.find.CLASS=function(_ac,_ad){
|
||||
return _ad.getElementsByClassName(_ac[1]);
|
||||
};
|
||||
}
|
||||
function _3d(dir,cur,_ae,_af,_b0){
|
||||
for(var i=0,l=_af.length;i<l;i++){
|
||||
var _b1=_af[i];
|
||||
if(_b1){
|
||||
_b1=_b1[dir];
|
||||
var _b2=false;
|
||||
while(_b1&&_b1.nodeType){
|
||||
var _b3=_b1[_ae];
|
||||
if(_b3){
|
||||
_b2=_af[_b3];
|
||||
break;
|
||||
}
|
||||
if(_b1.nodeType===1){
|
||||
_b1[_ae]=i;
|
||||
}
|
||||
if(_b1.nodeName===cur){
|
||||
_b2=_b1;
|
||||
break;
|
||||
}
|
||||
_b1=_b1[dir];
|
||||
}
|
||||
_af[i]=_b2;
|
||||
}
|
||||
}
|
||||
};
|
||||
function _3b(dir,cur,_b4,_b5,_b6){
|
||||
for(var i=0,l=_b5.length;i<l;i++){
|
||||
var _b7=_b5[i];
|
||||
if(_b7){
|
||||
_b7=_b7[dir];
|
||||
var _b8=false;
|
||||
while(_b7&&_b7.nodeType){
|
||||
if(_b7[_b4]){
|
||||
_b8=_b5[_b7[_b4]];
|
||||
break;
|
||||
}
|
||||
if(_b7.nodeType===1){
|
||||
_b7[_b4]=i;
|
||||
if(typeof cur!=="string"){
|
||||
if(_b7===cur){
|
||||
_b8=true;
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
if(_9.filter(cur,[_b7]).length>0){
|
||||
_b8=_b7;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
_b7=_b7[dir];
|
||||
}
|
||||
_b5[i]=_b8;
|
||||
}
|
||||
}
|
||||
};
|
||||
var _1a=document.compareDocumentPosition?function(a,b){
|
||||
return a.compareDocumentPosition(b)&16;
|
||||
}:function(a,b){
|
||||
return a!==b&&(a.contains?a.contains(b):true);
|
||||
};
|
||||
(ns||window).Sizzle=_9;
|
||||
})(typeof dojo=="undefined"?null:dojo);
|
||||
}
|
||||
797
lib/dojo/_base/query.js
Normal file
797
lib/dojo/_base/query.js
Normal file
@@ -0,0 +1,797 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base.query"]){
|
||||
dojo._hasResource["dojo._base.query"]=true;
|
||||
if(typeof dojo!="undefined"){
|
||||
dojo.provide("dojo._base.query");
|
||||
dojo.require("dojo._base.NodeList");
|
||||
dojo.require("dojo._base.lang");
|
||||
}
|
||||
(function(d){
|
||||
var _1=d.trim;
|
||||
var _2=d.forEach;
|
||||
var _3=d._NodeListCtor=d.NodeList;
|
||||
var _4=function(){
|
||||
return d.doc;
|
||||
};
|
||||
var _5=((d.isWebKit||d.isMozilla)&&((_4().compatMode)=="BackCompat"));
|
||||
var _6=!!_4().firstChild["children"]?"children":"childNodes";
|
||||
var _7=">~+";
|
||||
var _8=false;
|
||||
var _9=function(){
|
||||
return true;
|
||||
};
|
||||
var _a=function(_b){
|
||||
if(_7.indexOf(_b.slice(-1))>=0){
|
||||
_b+=" * ";
|
||||
}else{
|
||||
_b+=" ";
|
||||
}
|
||||
var ts=function(s,e){
|
||||
return _1(_b.slice(s,e));
|
||||
};
|
||||
var _c=[];
|
||||
var _d=-1,_e=-1,_f=-1,_10=-1,_11=-1,_12=-1,_13=-1,lc="",cc="",_14;
|
||||
var x=0,ql=_b.length,_15=null,_16=null;
|
||||
var _17=function(){
|
||||
if(_13>=0){
|
||||
var tv=(_13==x)?null:ts(_13,x);
|
||||
_15[(_7.indexOf(tv)<0)?"tag":"oper"]=tv;
|
||||
_13=-1;
|
||||
}
|
||||
};
|
||||
var _18=function(){
|
||||
if(_12>=0){
|
||||
_15.id=ts(_12,x).replace(/\\/g,"");
|
||||
_12=-1;
|
||||
}
|
||||
};
|
||||
var _19=function(){
|
||||
if(_11>=0){
|
||||
_15.classes.push(ts(_11+1,x).replace(/\\/g,""));
|
||||
_11=-1;
|
||||
}
|
||||
};
|
||||
var _1a=function(){
|
||||
_18();
|
||||
_17();
|
||||
_19();
|
||||
};
|
||||
var _1b=function(){
|
||||
_1a();
|
||||
if(_10>=0){
|
||||
_15.pseudos.push({name:ts(_10+1,x)});
|
||||
}
|
||||
_15.loops=(_15.pseudos.length||_15.attrs.length||_15.classes.length);
|
||||
_15.oquery=_15.query=ts(_14,x);
|
||||
_15.otag=_15.tag=(_15["oper"])?null:(_15.tag||"*");
|
||||
if(_15.tag){
|
||||
_15.tag=_15.tag.toUpperCase();
|
||||
}
|
||||
if(_c.length&&(_c[_c.length-1].oper)){
|
||||
_15.infixOper=_c.pop();
|
||||
_15.query=_15.infixOper.query+" "+_15.query;
|
||||
}
|
||||
_c.push(_15);
|
||||
_15=null;
|
||||
};
|
||||
for(;lc=cc,cc=_b.charAt(x),x<ql;x++){
|
||||
if(lc=="\\"){
|
||||
continue;
|
||||
}
|
||||
if(!_15){
|
||||
_14=x;
|
||||
_15={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){
|
||||
return (_8)?this.otag:this.tag;
|
||||
}};
|
||||
_13=x;
|
||||
}
|
||||
if(_d>=0){
|
||||
if(cc=="]"){
|
||||
if(!_16.attr){
|
||||
_16.attr=ts(_d+1,x);
|
||||
}else{
|
||||
_16.matchFor=ts((_f||_d+1),x);
|
||||
}
|
||||
var cmf=_16.matchFor;
|
||||
if(cmf){
|
||||
if((cmf.charAt(0)=="\"")||(cmf.charAt(0)=="'")){
|
||||
_16.matchFor=cmf.slice(1,-1);
|
||||
}
|
||||
}
|
||||
_15.attrs.push(_16);
|
||||
_16=null;
|
||||
_d=_f=-1;
|
||||
}else{
|
||||
if(cc=="="){
|
||||
var _1c=("|~^$*".indexOf(lc)>=0)?lc:"";
|
||||
_16.type=_1c+cc;
|
||||
_16.attr=ts(_d+1,x-_1c.length);
|
||||
_f=x+1;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(_e>=0){
|
||||
if(cc==")"){
|
||||
if(_10>=0){
|
||||
_16.value=ts(_e+1,x);
|
||||
}
|
||||
_10=_e=-1;
|
||||
}
|
||||
}else{
|
||||
if(cc=="#"){
|
||||
_1a();
|
||||
_12=x+1;
|
||||
}else{
|
||||
if(cc=="."){
|
||||
_1a();
|
||||
_11=x;
|
||||
}else{
|
||||
if(cc==":"){
|
||||
_1a();
|
||||
_10=x;
|
||||
}else{
|
||||
if(cc=="["){
|
||||
_1a();
|
||||
_d=x;
|
||||
_16={};
|
||||
}else{
|
||||
if(cc=="("){
|
||||
if(_10>=0){
|
||||
_16={name:ts(_10+1,x),value:null};
|
||||
_15.pseudos.push(_16);
|
||||
}
|
||||
_e=x;
|
||||
}else{
|
||||
if((cc==" ")&&(lc!=cc)){
|
||||
_1b();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return _c;
|
||||
};
|
||||
var _1d=function(_1e,_1f){
|
||||
if(!_1e){
|
||||
return _1f;
|
||||
}
|
||||
if(!_1f){
|
||||
return _1e;
|
||||
}
|
||||
return function(){
|
||||
return _1e.apply(window,arguments)&&_1f.apply(window,arguments);
|
||||
};
|
||||
};
|
||||
var _20=function(i,arr){
|
||||
var r=arr||[];
|
||||
if(i){
|
||||
r.push(i);
|
||||
}
|
||||
return r;
|
||||
};
|
||||
var _21=function(n){
|
||||
return (1==n.nodeType);
|
||||
};
|
||||
var _22="";
|
||||
var _23=function(_24,_25){
|
||||
if(!_24){
|
||||
return _22;
|
||||
}
|
||||
if(_25=="class"){
|
||||
return _24.className||_22;
|
||||
}
|
||||
if(_25=="for"){
|
||||
return _24.htmlFor||_22;
|
||||
}
|
||||
if(_25=="style"){
|
||||
return _24.style.cssText||_22;
|
||||
}
|
||||
return (_8?_24.getAttribute(_25):_24.getAttribute(_25,2))||_22;
|
||||
};
|
||||
var _26={"*=":function(_27,_28){
|
||||
return function(_29){
|
||||
return (_23(_29,_27).indexOf(_28)>=0);
|
||||
};
|
||||
},"^=":function(_2a,_2b){
|
||||
return function(_2c){
|
||||
return (_23(_2c,_2a).indexOf(_2b)==0);
|
||||
};
|
||||
},"$=":function(_2d,_2e){
|
||||
var _2f=" "+_2e;
|
||||
return function(_30){
|
||||
var ea=" "+_23(_30,_2d);
|
||||
return (ea.lastIndexOf(_2e)==(ea.length-_2e.length));
|
||||
};
|
||||
},"~=":function(_31,_32){
|
||||
var _33=" "+_32+" ";
|
||||
return function(_34){
|
||||
var ea=" "+_23(_34,_31)+" ";
|
||||
return (ea.indexOf(_33)>=0);
|
||||
};
|
||||
},"|=":function(_35,_36){
|
||||
var _37=" "+_36+"-";
|
||||
return function(_38){
|
||||
var ea=" "+_23(_38,_35);
|
||||
return ((ea==_36)||(ea.indexOf(_37)==0));
|
||||
};
|
||||
},"=":function(_39,_3a){
|
||||
return function(_3b){
|
||||
return (_23(_3b,_39)==_3a);
|
||||
};
|
||||
}};
|
||||
var _3c=(typeof _4().firstChild.nextElementSibling=="undefined");
|
||||
var _3d=!_3c?"nextElementSibling":"nextSibling";
|
||||
var _3e=!_3c?"previousElementSibling":"previousSibling";
|
||||
var _3f=(_3c?_21:_9);
|
||||
var _40=function(_41){
|
||||
while(_41=_41[_3e]){
|
||||
if(_3f(_41)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
var _42=function(_43){
|
||||
while(_43=_43[_3d]){
|
||||
if(_3f(_43)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
var _44=function(_45){
|
||||
var _46=_45.parentNode;
|
||||
var i=0,_47=_46[_6],ci=(_45["_i"]||-1),cl=(_46["_l"]||-1);
|
||||
if(!_47){
|
||||
return -1;
|
||||
}
|
||||
var l=_47.length;
|
||||
if(cl==l&&ci>=0&&cl>=0){
|
||||
return ci;
|
||||
}
|
||||
_46["_l"]=l;
|
||||
ci=-1;
|
||||
for(var te=_46["firstElementChild"]||_46["firstChild"];te;te=te[_3d]){
|
||||
if(_3f(te)){
|
||||
te["_i"]=++i;
|
||||
if(_45===te){
|
||||
ci=i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ci;
|
||||
};
|
||||
var _48=function(_49){
|
||||
return !((_44(_49))%2);
|
||||
};
|
||||
var _4a=function(_4b){
|
||||
return ((_44(_4b))%2);
|
||||
};
|
||||
var _4c={"checked":function(_4d,_4e){
|
||||
return function(_4f){
|
||||
return !!("checked" in _4f?_4f.checked:_4f.selected);
|
||||
};
|
||||
},"first-child":function(){
|
||||
return _40;
|
||||
},"last-child":function(){
|
||||
return _42;
|
||||
},"only-child":function(_50,_51){
|
||||
return function(_52){
|
||||
if(!_40(_52)){
|
||||
return false;
|
||||
}
|
||||
if(!_42(_52)){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
},"empty":function(_53,_54){
|
||||
return function(_55){
|
||||
var cn=_55.childNodes;
|
||||
var cnl=_55.childNodes.length;
|
||||
for(var x=cnl-1;x>=0;x--){
|
||||
var nt=cn[x].nodeType;
|
||||
if((nt===1)||(nt==3)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
},"contains":function(_56,_57){
|
||||
var cz=_57.charAt(0);
|
||||
if(cz=="\""||cz=="'"){
|
||||
_57=_57.slice(1,-1);
|
||||
}
|
||||
return function(_58){
|
||||
return (_58.innerHTML.indexOf(_57)>=0);
|
||||
};
|
||||
},"not":function(_59,_5a){
|
||||
var p=_a(_5a)[0];
|
||||
var _5b={el:1};
|
||||
if(p.tag!="*"){
|
||||
_5b.tag=1;
|
||||
}
|
||||
if(!p.classes.length){
|
||||
_5b.classes=1;
|
||||
}
|
||||
var ntf=_5c(p,_5b);
|
||||
return function(_5d){
|
||||
return (!ntf(_5d));
|
||||
};
|
||||
},"nth-child":function(_5e,_5f){
|
||||
var pi=parseInt;
|
||||
if(_5f=="odd"){
|
||||
return _4a;
|
||||
}else{
|
||||
if(_5f=="even"){
|
||||
return _48;
|
||||
}
|
||||
}
|
||||
if(_5f.indexOf("n")!=-1){
|
||||
var _60=_5f.split("n",2);
|
||||
var _61=_60[0]?((_60[0]=="-")?-1:pi(_60[0])):1;
|
||||
var idx=_60[1]?pi(_60[1]):0;
|
||||
var lb=0,ub=-1;
|
||||
if(_61>0){
|
||||
if(idx<0){
|
||||
idx=(idx%_61)&&(_61+(idx%_61));
|
||||
}else{
|
||||
if(idx>0){
|
||||
if(idx>=_61){
|
||||
lb=idx-idx%_61;
|
||||
}
|
||||
idx=idx%_61;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(_61<0){
|
||||
_61*=-1;
|
||||
if(idx>0){
|
||||
ub=idx;
|
||||
idx=idx%_61;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_61>0){
|
||||
return function(_62){
|
||||
var i=_44(_62);
|
||||
return (i>=lb)&&(ub<0||i<=ub)&&((i%_61)==idx);
|
||||
};
|
||||
}else{
|
||||
_5f=idx;
|
||||
}
|
||||
}
|
||||
var _63=pi(_5f);
|
||||
return function(_64){
|
||||
return (_44(_64)==_63);
|
||||
};
|
||||
}};
|
||||
var _65=(d.isIE)?function(_66){
|
||||
var clc=_66.toLowerCase();
|
||||
if(clc=="class"){
|
||||
_66="className";
|
||||
}
|
||||
return function(_67){
|
||||
return (_8?_67.getAttribute(_66):_67[_66]||_67[clc]);
|
||||
};
|
||||
}:function(_68){
|
||||
return function(_69){
|
||||
return (_69&&_69.getAttribute&&_69.hasAttribute(_68));
|
||||
};
|
||||
};
|
||||
var _5c=function(_6a,_6b){
|
||||
if(!_6a){
|
||||
return _9;
|
||||
}
|
||||
_6b=_6b||{};
|
||||
var ff=null;
|
||||
if(!("el" in _6b)){
|
||||
ff=_1d(ff,_21);
|
||||
}
|
||||
if(!("tag" in _6b)){
|
||||
if(_6a.tag!="*"){
|
||||
ff=_1d(ff,function(_6c){
|
||||
return (_6c&&(_6c.tagName==_6a.getTag()));
|
||||
});
|
||||
}
|
||||
}
|
||||
if(!("classes" in _6b)){
|
||||
_2(_6a.classes,function(_6d,idx,arr){
|
||||
var re=new RegExp("(?:^|\\s)"+_6d+"(?:\\s|$)");
|
||||
ff=_1d(ff,function(_6e){
|
||||
return re.test(_6e.className);
|
||||
});
|
||||
ff.count=idx;
|
||||
});
|
||||
}
|
||||
if(!("pseudos" in _6b)){
|
||||
_2(_6a.pseudos,function(_6f){
|
||||
var pn=_6f.name;
|
||||
if(_4c[pn]){
|
||||
ff=_1d(ff,_4c[pn](pn,_6f.value));
|
||||
}
|
||||
});
|
||||
}
|
||||
if(!("attrs" in _6b)){
|
||||
_2(_6a.attrs,function(_70){
|
||||
var _71;
|
||||
var a=_70.attr;
|
||||
if(_70.type&&_26[_70.type]){
|
||||
_71=_26[_70.type](a,_70.matchFor);
|
||||
}else{
|
||||
if(a.length){
|
||||
_71=_65(a);
|
||||
}
|
||||
}
|
||||
if(_71){
|
||||
ff=_1d(ff,_71);
|
||||
}
|
||||
});
|
||||
}
|
||||
if(!("id" in _6b)){
|
||||
if(_6a.id){
|
||||
ff=_1d(ff,function(_72){
|
||||
return (!!_72&&(_72.id==_6a.id));
|
||||
});
|
||||
}
|
||||
}
|
||||
if(!ff){
|
||||
if(!("default" in _6b)){
|
||||
ff=_9;
|
||||
}
|
||||
}
|
||||
return ff;
|
||||
};
|
||||
var _73=function(_74){
|
||||
return function(_75,ret,bag){
|
||||
while(_75=_75[_3d]){
|
||||
if(_3c&&(!_21(_75))){
|
||||
continue;
|
||||
}
|
||||
if((!bag||_76(_75,bag))&&_74(_75)){
|
||||
ret.push(_75);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
};
|
||||
var _77=function(_78){
|
||||
return function(_79,ret,bag){
|
||||
var te=_79[_3d];
|
||||
while(te){
|
||||
if(_3f(te)){
|
||||
if(bag&&!_76(te,bag)){
|
||||
break;
|
||||
}
|
||||
if(_78(te)){
|
||||
ret.push(te);
|
||||
}
|
||||
}
|
||||
te=te[_3d];
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
};
|
||||
var _7a=function(_7b){
|
||||
_7b=_7b||_9;
|
||||
return function(_7c,ret,bag){
|
||||
var te,x=0,_7d=_7c[_6];
|
||||
while(te=_7d[x++]){
|
||||
if(_3f(te)&&(!bag||_76(te,bag))&&(_7b(te,x))){
|
||||
ret.push(te);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
};
|
||||
var _7e=function(_7f,_80){
|
||||
var pn=_7f.parentNode;
|
||||
while(pn){
|
||||
if(pn==_80){
|
||||
break;
|
||||
}
|
||||
pn=pn.parentNode;
|
||||
}
|
||||
return !!pn;
|
||||
};
|
||||
var _81={};
|
||||
var _82=function(_83){
|
||||
var _84=_81[_83.query];
|
||||
if(_84){
|
||||
return _84;
|
||||
}
|
||||
var io=_83.infixOper;
|
||||
var _85=(io?io.oper:"");
|
||||
var _86=_5c(_83,{el:1});
|
||||
var qt=_83.tag;
|
||||
var _87=("*"==qt);
|
||||
var ecs=_4()["getElementsByClassName"];
|
||||
if(!_85){
|
||||
if(_83.id){
|
||||
_86=(!_83.loops&&_87)?_9:_5c(_83,{el:1,id:1});
|
||||
_84=function(_88,arr){
|
||||
var te=d.byId(_83.id,(_88.ownerDocument||_88));
|
||||
if(!te||!_86(te)){
|
||||
return;
|
||||
}
|
||||
if(9==_88.nodeType){
|
||||
return _20(te,arr);
|
||||
}else{
|
||||
if(_7e(te,_88)){
|
||||
return _20(te,arr);
|
||||
}
|
||||
}
|
||||
};
|
||||
}else{
|
||||
if(ecs&&/\{\s*\[native code\]\s*\}/.test(String(ecs))&&_83.classes.length&&!_5){
|
||||
_86=_5c(_83,{el:1,classes:1,id:1});
|
||||
var _89=_83.classes.join(" ");
|
||||
_84=function(_8a,arr,bag){
|
||||
var ret=_20(0,arr),te,x=0;
|
||||
var _8b=_8a.getElementsByClassName(_89);
|
||||
while((te=_8b[x++])){
|
||||
if(_86(te,_8a)&&_76(te,bag)){
|
||||
ret.push(te);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
}else{
|
||||
if(!_87&&!_83.loops){
|
||||
_84=function(_8c,arr,bag){
|
||||
var ret=_20(0,arr),te,x=0;
|
||||
var _8d=_8c.getElementsByTagName(_83.getTag());
|
||||
while((te=_8d[x++])){
|
||||
if(_76(te,bag)){
|
||||
ret.push(te);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
}else{
|
||||
_86=_5c(_83,{el:1,tag:1,id:1});
|
||||
_84=function(_8e,arr,bag){
|
||||
var ret=_20(0,arr),te,x=0;
|
||||
var _8f=_8e.getElementsByTagName(_83.getTag());
|
||||
while((te=_8f[x++])){
|
||||
if(_86(te,_8e)&&_76(te,bag)){
|
||||
ret.push(te);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
var _90={el:1};
|
||||
if(_87){
|
||||
_90.tag=1;
|
||||
}
|
||||
_86=_5c(_83,_90);
|
||||
if("+"==_85){
|
||||
_84=_73(_86);
|
||||
}else{
|
||||
if("~"==_85){
|
||||
_84=_77(_86);
|
||||
}else{
|
||||
if(">"==_85){
|
||||
_84=_7a(_86);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return _81[_83.query]=_84;
|
||||
};
|
||||
var _91=function(_92,_93){
|
||||
var _94=_20(_92),qp,x,te,qpl=_93.length,bag,ret;
|
||||
for(var i=0;i<qpl;i++){
|
||||
ret=[];
|
||||
qp=_93[i];
|
||||
x=_94.length-1;
|
||||
if(x>0){
|
||||
bag={};
|
||||
ret.nozip=true;
|
||||
}
|
||||
var gef=_82(qp);
|
||||
for(var j=0;(te=_94[j]);j++){
|
||||
gef(te,ret,bag);
|
||||
}
|
||||
if(!ret.length){
|
||||
break;
|
||||
}
|
||||
_94=ret;
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
var _95={},_96={};
|
||||
var _97=function(_98){
|
||||
var _99=_a(_1(_98));
|
||||
if(_99.length==1){
|
||||
var tef=_82(_99[0]);
|
||||
return function(_9a){
|
||||
var r=tef(_9a,new _3());
|
||||
if(r){
|
||||
r.nozip=true;
|
||||
}
|
||||
return r;
|
||||
};
|
||||
}
|
||||
return function(_9b){
|
||||
return _91(_9b,_99);
|
||||
};
|
||||
};
|
||||
var nua=navigator.userAgent;
|
||||
var wk="WebKit/";
|
||||
var _9c=(d.isWebKit&&(nua.indexOf(wk)>0)&&(parseFloat(nua.split(wk)[1])>528));
|
||||
var _9d=d.isIE?"commentStrip":"nozip";
|
||||
var qsa="querySelectorAll";
|
||||
var _9e=(!!_4()[qsa]&&(!d.isSafari||(d.isSafari>3.1)||_9c));
|
||||
var _9f=/n\+\d|([^ ])?([>~+])([^ =])?/g;
|
||||
var _a0=function(_a1,pre,ch,_a2){
|
||||
return ch?(pre?pre+" ":"")+ch+(_a2?" "+_a2:""):_a1;
|
||||
};
|
||||
var _a3=function(_a4,_a5){
|
||||
_a4=_a4.replace(_9f,_a0);
|
||||
if(_9e){
|
||||
var _a6=_96[_a4];
|
||||
if(_a6&&!_a5){
|
||||
return _a6;
|
||||
}
|
||||
}
|
||||
var _a7=_95[_a4];
|
||||
if(_a7){
|
||||
return _a7;
|
||||
}
|
||||
var qcz=_a4.charAt(0);
|
||||
var _a8=(-1==_a4.indexOf(" "));
|
||||
if((_a4.indexOf("#")>=0)&&(_a8)){
|
||||
_a5=true;
|
||||
}
|
||||
var _a9=(_9e&&(!_a5)&&(_7.indexOf(qcz)==-1)&&(!d.isIE||(_a4.indexOf(":")==-1))&&(!(_5&&(_a4.indexOf(".")>=0)))&&(_a4.indexOf(":contains")==-1)&&(_a4.indexOf(":checked")==-1)&&(_a4.indexOf("|=")==-1));
|
||||
if(_a9){
|
||||
var tq=(_7.indexOf(_a4.charAt(_a4.length-1))>=0)?(_a4+" *"):_a4;
|
||||
return _96[_a4]=function(_aa){
|
||||
try{
|
||||
if(!((9==_aa.nodeType)||_a8)){
|
||||
throw "";
|
||||
}
|
||||
var r=_aa[qsa](tq);
|
||||
r[_9d]=true;
|
||||
return r;
|
||||
}
|
||||
catch(e){
|
||||
return _a3(_a4,true)(_aa);
|
||||
}
|
||||
};
|
||||
}else{
|
||||
var _ab=_a4.split(/\s*,\s*/);
|
||||
return _95[_a4]=((_ab.length<2)?_97(_a4):function(_ac){
|
||||
var _ad=0,ret=[],tp;
|
||||
while((tp=_ab[_ad++])){
|
||||
ret=ret.concat(_97(tp)(_ac));
|
||||
}
|
||||
return ret;
|
||||
});
|
||||
}
|
||||
};
|
||||
var _ae=0;
|
||||
var _af=d.isIE?function(_b0){
|
||||
if(_8){
|
||||
return (_b0.getAttribute("_uid")||_b0.setAttribute("_uid",++_ae)||_ae);
|
||||
}else{
|
||||
return _b0.uniqueID;
|
||||
}
|
||||
}:function(_b1){
|
||||
return (_b1._uid||(_b1._uid=++_ae));
|
||||
};
|
||||
var _76=function(_b2,bag){
|
||||
if(!bag){
|
||||
return 1;
|
||||
}
|
||||
var id=_af(_b2);
|
||||
if(!bag[id]){
|
||||
return bag[id]=1;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
var _b3="_zipIdx";
|
||||
var _b4=function(arr){
|
||||
if(arr&&arr.nozip){
|
||||
return (_3._wrap)?_3._wrap(arr):arr;
|
||||
}
|
||||
var ret=new _3();
|
||||
if(!arr||!arr.length){
|
||||
return ret;
|
||||
}
|
||||
if(arr[0]){
|
||||
ret.push(arr[0]);
|
||||
}
|
||||
if(arr.length<2){
|
||||
return ret;
|
||||
}
|
||||
_ae++;
|
||||
if(d.isIE&&_8){
|
||||
var _b5=_ae+"";
|
||||
arr[0].setAttribute(_b3,_b5);
|
||||
for(var x=1,te;te=arr[x];x++){
|
||||
if(arr[x].getAttribute(_b3)!=_b5){
|
||||
ret.push(te);
|
||||
}
|
||||
te.setAttribute(_b3,_b5);
|
||||
}
|
||||
}else{
|
||||
if(d.isIE&&arr.commentStrip){
|
||||
try{
|
||||
for(var x=1,te;te=arr[x];x++){
|
||||
if(_21(te)){
|
||||
ret.push(te);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
}else{
|
||||
if(arr[0]){
|
||||
arr[0][_b3]=_ae;
|
||||
}
|
||||
for(var x=1,te;te=arr[x];x++){
|
||||
if(arr[x][_b3]!=_ae){
|
||||
ret.push(te);
|
||||
}
|
||||
te[_b3]=_ae;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
d.query=function(_b6,_b7){
|
||||
_3=d._NodeListCtor;
|
||||
if(!_b6){
|
||||
return new _3();
|
||||
}
|
||||
if(_b6.constructor==_3){
|
||||
return _b6;
|
||||
}
|
||||
if(typeof _b6!="string"){
|
||||
return new _3(_b6);
|
||||
}
|
||||
if(typeof _b7=="string"){
|
||||
_b7=d.byId(_b7);
|
||||
if(!_b7){
|
||||
return new _3();
|
||||
}
|
||||
}
|
||||
_b7=_b7||_4();
|
||||
var od=_b7.ownerDocument||_b7.documentElement;
|
||||
_8=(_b7.contentType&&_b7.contentType=="application/xml")||(d.isOpera&&(_b7.doctype||od.toString()=="[object XMLDocument]"))||(!!od)&&(d.isIE?od.xml:(_b7.xmlVersion||od.xmlVersion));
|
||||
var r=_a3(_b6)(_b7);
|
||||
if(r&&r.nozip&&!_3._wrap){
|
||||
return r;
|
||||
}
|
||||
return _b4(r);
|
||||
};
|
||||
d.query.pseudos=_4c;
|
||||
d._filterQueryResult=function(_b8,_b9){
|
||||
var _ba=new d._NodeListCtor();
|
||||
var _bb=_5c(_a(_b9)[0]);
|
||||
for(var x=0,te;te=_b8[x];x++){
|
||||
if(_bb(te)){
|
||||
_ba.push(te);
|
||||
}
|
||||
}
|
||||
return _ba;
|
||||
};
|
||||
})(this["queryPortability"]||this["acme"]||dojo);
|
||||
}
|
||||
49
lib/dojo/_base/window.js
Normal file
49
lib/dojo/_base/window.js
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base.window"]){
|
||||
dojo._hasResource["dojo._base.window"]=true;
|
||||
dojo.provide("dojo._base.window");
|
||||
dojo.doc=window["document"]||null;
|
||||
dojo.body=function(){
|
||||
return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];
|
||||
};
|
||||
dojo.setContext=function(_1,_2){
|
||||
dojo.global=_1;
|
||||
dojo.doc=_2;
|
||||
};
|
||||
dojo.withGlobal=function(_3,_4,_5,_6){
|
||||
var _7=dojo.global;
|
||||
try{
|
||||
dojo.global=_3;
|
||||
return dojo.withDoc.call(null,_3.document,_4,_5,_6);
|
||||
}
|
||||
finally{
|
||||
dojo.global=_7;
|
||||
}
|
||||
};
|
||||
dojo.withDoc=function(_8,_9,_a,_b){
|
||||
var _c=dojo.doc,_d=dojo._bodyLtr,_e=dojo.isQuirks;
|
||||
try{
|
||||
dojo.doc=_8;
|
||||
delete dojo._bodyLtr;
|
||||
dojo.isQuirks=dojo.doc.compatMode=="BackCompat";
|
||||
if(_a&&typeof _9=="string"){
|
||||
_9=_a[_9];
|
||||
}
|
||||
return _9.apply(_a,_b||[]);
|
||||
}
|
||||
finally{
|
||||
dojo.doc=_c;
|
||||
delete dojo._bodyLtr;
|
||||
if(_d!==undefined){
|
||||
dojo._bodyLtr=_d;
|
||||
}
|
||||
dojo.isQuirks=_e;
|
||||
}
|
||||
};
|
||||
}
|
||||
437
lib/dojo/_base/xhr.js
Normal file
437
lib/dojo/_base/xhr.js
Normal file
@@ -0,0 +1,437 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, 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
|
||||
*/
|
||||
|
||||
|
||||
if(!dojo._hasResource["dojo._base.xhr"]){
|
||||
dojo._hasResource["dojo._base.xhr"]=true;
|
||||
dojo.provide("dojo._base.xhr");
|
||||
dojo.require("dojo._base.Deferred");
|
||||
dojo.require("dojo._base.json");
|
||||
dojo.require("dojo._base.lang");
|
||||
dojo.require("dojo._base.query");
|
||||
(function(){
|
||||
var _1=dojo,_2=_1.config;
|
||||
function _3(_4,_5,_6){
|
||||
if(_6===null){
|
||||
return;
|
||||
}
|
||||
var _7=_4[_5];
|
||||
if(typeof _7=="string"){
|
||||
_4[_5]=[_7,_6];
|
||||
}else{
|
||||
if(_1.isArray(_7)){
|
||||
_7.push(_6);
|
||||
}else{
|
||||
_4[_5]=_6;
|
||||
}
|
||||
}
|
||||
};
|
||||
dojo.fieldToObject=function(_8){
|
||||
var _9=null;
|
||||
var _a=_1.byId(_8);
|
||||
if(_a){
|
||||
var _b=_a.name;
|
||||
var _c=(_a.type||"").toLowerCase();
|
||||
if(_b&&_c&&!_a.disabled){
|
||||
if(_c=="radio"||_c=="checkbox"){
|
||||
if(_a.checked){
|
||||
_9=_a.value;
|
||||
}
|
||||
}else{
|
||||
if(_a.multiple){
|
||||
_9=[];
|
||||
_1.query("option",_a).forEach(function(_d){
|
||||
if(_d.selected){
|
||||
_9.push(_d.value);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
_9=_a.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return _9;
|
||||
};
|
||||
dojo.formToObject=function(_e){
|
||||
var _f={};
|
||||
var _10="file|submit|image|reset|button|";
|
||||
_1.forEach(dojo.byId(_e).elements,function(_11){
|
||||
var _12=_11.name;
|
||||
var _13=(_11.type||"").toLowerCase();
|
||||
if(_12&&_13&&_10.indexOf(_13)==-1&&!_11.disabled){
|
||||
_3(_f,_12,_1.fieldToObject(_11));
|
||||
if(_13=="image"){
|
||||
_f[_12+".x"]=_f[_12+".y"]=_f[_12].x=_f[_12].y=0;
|
||||
}
|
||||
}
|
||||
});
|
||||
return _f;
|
||||
};
|
||||
dojo.objectToQuery=function(map){
|
||||
var enc=encodeURIComponent;
|
||||
var _14=[];
|
||||
var _15={};
|
||||
for(var _16 in map){
|
||||
var _17=map[_16];
|
||||
if(_17!=_15[_16]){
|
||||
var _18=enc(_16)+"=";
|
||||
if(_1.isArray(_17)){
|
||||
for(var i=0;i<_17.length;i++){
|
||||
_14.push(_18+enc(_17[i]));
|
||||
}
|
||||
}else{
|
||||
_14.push(_18+enc(_17));
|
||||
}
|
||||
}
|
||||
}
|
||||
return _14.join("&");
|
||||
};
|
||||
dojo.formToQuery=function(_19){
|
||||
return _1.objectToQuery(_1.formToObject(_19));
|
||||
};
|
||||
dojo.formToJson=function(_1a,_1b){
|
||||
return _1.toJson(_1.formToObject(_1a),_1b);
|
||||
};
|
||||
dojo.queryToObject=function(str){
|
||||
var ret={};
|
||||
var qp=str.split("&");
|
||||
var dec=decodeURIComponent;
|
||||
_1.forEach(qp,function(_1c){
|
||||
if(_1c.length){
|
||||
var _1d=_1c.split("=");
|
||||
var _1e=dec(_1d.shift());
|
||||
var val=dec(_1d.join("="));
|
||||
if(typeof ret[_1e]=="string"){
|
||||
ret[_1e]=[ret[_1e]];
|
||||
}
|
||||
if(_1.isArray(ret[_1e])){
|
||||
ret[_1e].push(val);
|
||||
}else{
|
||||
ret[_1e]=val;
|
||||
}
|
||||
}
|
||||
});
|
||||
return ret;
|
||||
};
|
||||
dojo._blockAsync=false;
|
||||
var _1f=_1._contentHandlers=dojo.contentHandlers={text:function(xhr){
|
||||
return xhr.responseText;
|
||||
},json:function(xhr){
|
||||
return _1.fromJson(xhr.responseText||null);
|
||||
},"json-comment-filtered":function(xhr){
|
||||
if(!dojo.config.useCommentedJson){
|
||||
console.warn("Consider using the standard mimetype:application/json."+" json-commenting can introduce security issues. To"+" decrease the chances of hijacking, use the standard the 'json' handler and"+" prefix your json with: {}&&\n"+"Use djConfig.useCommentedJson=true to turn off this message.");
|
||||
}
|
||||
var _20=xhr.responseText;
|
||||
var _21=_20.indexOf("/*");
|
||||
var _22=_20.lastIndexOf("*/");
|
||||
if(_21==-1||_22==-1){
|
||||
throw new Error("JSON was not comment filtered");
|
||||
}
|
||||
return _1.fromJson(_20.substring(_21+2,_22));
|
||||
},javascript:function(xhr){
|
||||
return _1.eval(xhr.responseText);
|
||||
},xml:function(xhr){
|
||||
var _23=xhr.responseXML;
|
||||
if(_1.isIE&&(!_23||!_23.documentElement)){
|
||||
var ms=function(n){
|
||||
return "MSXML"+n+".DOMDocument";
|
||||
};
|
||||
var dp=["Microsoft.XMLDOM",ms(6),ms(4),ms(3),ms(2)];
|
||||
_1.some(dp,function(p){
|
||||
try{
|
||||
var dom=new ActiveXObject(p);
|
||||
dom.async=false;
|
||||
dom.loadXML(xhr.responseText);
|
||||
_23=dom;
|
||||
}
|
||||
catch(e){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
return _23;
|
||||
},"json-comment-optional":function(xhr){
|
||||
if(xhr.responseText&&/^[^{\[]*\/\*/.test(xhr.responseText)){
|
||||
return _1f["json-comment-filtered"](xhr);
|
||||
}else{
|
||||
return _1f["json"](xhr);
|
||||
}
|
||||
}};
|
||||
dojo._ioSetArgs=function(_24,_25,_26,_27){
|
||||
var _28={args:_24,url:_24.url};
|
||||
var _29=null;
|
||||
if(_24.form){
|
||||
var _2a=_1.byId(_24.form);
|
||||
var _2b=_2a.getAttributeNode("action");
|
||||
_28.url=_28.url||(_2b?_2b.value:null);
|
||||
_29=_1.formToObject(_2a);
|
||||
}
|
||||
var _2c=[{}];
|
||||
if(_29){
|
||||
_2c.push(_29);
|
||||
}
|
||||
if(_24.content){
|
||||
_2c.push(_24.content);
|
||||
}
|
||||
if(_24.preventCache){
|
||||
_2c.push({"dojo.preventCache":new Date().valueOf()});
|
||||
}
|
||||
_28.query=_1.objectToQuery(_1.mixin.apply(null,_2c));
|
||||
_28.handleAs=_24.handleAs||"text";
|
||||
var d=new _1.Deferred(_25);
|
||||
d.addCallbacks(_26,function(_2d){
|
||||
return _27(_2d,d);
|
||||
});
|
||||
var ld=_24.load;
|
||||
if(ld&&_1.isFunction(ld)){
|
||||
d.addCallback(function(_2e){
|
||||
return ld.call(_24,_2e,_28);
|
||||
});
|
||||
}
|
||||
var err=_24.error;
|
||||
if(err&&_1.isFunction(err)){
|
||||
d.addErrback(function(_2f){
|
||||
return err.call(_24,_2f,_28);
|
||||
});
|
||||
}
|
||||
var _30=_24.handle;
|
||||
if(_30&&_1.isFunction(_30)){
|
||||
d.addBoth(function(_31){
|
||||
return _30.call(_24,_31,_28);
|
||||
});
|
||||
}
|
||||
if(_2.ioPublish&&_1.publish&&_28.args.ioPublish!==false){
|
||||
d.addCallbacks(function(res){
|
||||
_1.publish("/dojo/io/load",[d,res]);
|
||||
return res;
|
||||
},function(res){
|
||||
_1.publish("/dojo/io/error",[d,res]);
|
||||
return res;
|
||||
});
|
||||
d.addBoth(function(res){
|
||||
_1.publish("/dojo/io/done",[d,res]);
|
||||
return res;
|
||||
});
|
||||
}
|
||||
d.ioArgs=_28;
|
||||
return d;
|
||||
};
|
||||
var _32=function(dfd){
|
||||
dfd.canceled=true;
|
||||
var xhr=dfd.ioArgs.xhr;
|
||||
var _33=typeof xhr.abort;
|
||||
if(_33=="function"||_33=="object"||_33=="unknown"){
|
||||
xhr.abort();
|
||||
}
|
||||
var err=dfd.ioArgs.error;
|
||||
if(!err){
|
||||
err=new Error("xhr cancelled");
|
||||
err.dojoType="cancel";
|
||||
}
|
||||
return err;
|
||||
};
|
||||
var _34=function(dfd){
|
||||
var ret=_1f[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);
|
||||
return ret===undefined?null:ret;
|
||||
};
|
||||
var _35=function(_36,dfd){
|
||||
if(!dfd.ioArgs.args.failOk){
|
||||
console.error(_36);
|
||||
}
|
||||
return _36;
|
||||
};
|
||||
var _37=null;
|
||||
var _38=[];
|
||||
var _39=0;
|
||||
var _3a=function(dfd){
|
||||
if(_39<=0){
|
||||
_39=0;
|
||||
if(_2.ioPublish&&_1.publish&&(!dfd||dfd&&dfd.ioArgs.args.ioPublish!==false)){
|
||||
_1.publish("/dojo/io/stop");
|
||||
}
|
||||
}
|
||||
};
|
||||
var _3b=function(){
|
||||
var now=(new Date()).getTime();
|
||||
if(!_1._blockAsync){
|
||||
for(var i=0,tif;i<_38.length&&(tif=_38[i]);i++){
|
||||
var dfd=tif.dfd;
|
||||
var _3c=function(){
|
||||
if(!dfd||dfd.canceled||!tif.validCheck(dfd)){
|
||||
_38.splice(i--,1);
|
||||
_39-=1;
|
||||
}else{
|
||||
if(tif.ioCheck(dfd)){
|
||||
_38.splice(i--,1);
|
||||
tif.resHandle(dfd);
|
||||
_39-=1;
|
||||
}else{
|
||||
if(dfd.startTime){
|
||||
if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){
|
||||
_38.splice(i--,1);
|
||||
var err=new Error("timeout exceeded");
|
||||
err.dojoType="timeout";
|
||||
dfd.errback(err);
|
||||
dfd.cancel();
|
||||
_39-=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
if(dojo.config.debugAtAllCosts){
|
||||
_3c.call(this);
|
||||
}else{
|
||||
try{
|
||||
_3c.call(this);
|
||||
}
|
||||
catch(e){
|
||||
dfd.errback(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_3a(dfd);
|
||||
if(!_38.length){
|
||||
clearInterval(_37);
|
||||
_37=null;
|
||||
return;
|
||||
}
|
||||
};
|
||||
dojo._ioCancelAll=function(){
|
||||
try{
|
||||
_1.forEach(_38,function(i){
|
||||
try{
|
||||
i.dfd.cancel();
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
};
|
||||
if(_1.isIE){
|
||||
_1.addOnWindowUnload(_1._ioCancelAll);
|
||||
}
|
||||
_1._ioNotifyStart=function(dfd){
|
||||
if(_2.ioPublish&&_1.publish&&dfd.ioArgs.args.ioPublish!==false){
|
||||
if(!_39){
|
||||
_1.publish("/dojo/io/start");
|
||||
}
|
||||
_39+=1;
|
||||
_1.publish("/dojo/io/send",[dfd]);
|
||||
}
|
||||
};
|
||||
_1._ioWatch=function(dfd,_3d,_3e,_3f){
|
||||
var _40=dfd.ioArgs.args;
|
||||
if(_40.timeout){
|
||||
dfd.startTime=(new Date()).getTime();
|
||||
}
|
||||
_38.push({dfd:dfd,validCheck:_3d,ioCheck:_3e,resHandle:_3f});
|
||||
if(!_37){
|
||||
_37=setInterval(_3b,50);
|
||||
}
|
||||
if(_40.sync){
|
||||
_3b();
|
||||
}
|
||||
};
|
||||
var _41="application/x-www-form-urlencoded";
|
||||
var _42=function(dfd){
|
||||
return dfd.ioArgs.xhr.readyState;
|
||||
};
|
||||
var _43=function(dfd){
|
||||
return 4==dfd.ioArgs.xhr.readyState;
|
||||
};
|
||||
var _44=function(dfd){
|
||||
var xhr=dfd.ioArgs.xhr;
|
||||
if(_1._isDocumentOk(xhr)){
|
||||
dfd.callback(dfd);
|
||||
}else{
|
||||
var err=new Error("Unable to load "+dfd.ioArgs.url+" status:"+xhr.status);
|
||||
err.status=xhr.status;
|
||||
err.responseText=xhr.responseText;
|
||||
dfd.errback(err);
|
||||
}
|
||||
};
|
||||
dojo._ioAddQueryToUrl=function(_45){
|
||||
if(_45.query.length){
|
||||
_45.url+=(_45.url.indexOf("?")==-1?"?":"&")+_45.query;
|
||||
_45.query=null;
|
||||
}
|
||||
};
|
||||
dojo.xhr=function(_46,_47,_48){
|
||||
var dfd=_1._ioSetArgs(_47,_32,_34,_35);
|
||||
var _49=dfd.ioArgs;
|
||||
var xhr=_49.xhr=_1._xhrObj(_49.args);
|
||||
if(!xhr){
|
||||
dfd.cancel();
|
||||
return dfd;
|
||||
}
|
||||
if("postData" in _47){
|
||||
_49.query=_47.postData;
|
||||
}else{
|
||||
if("putData" in _47){
|
||||
_49.query=_47.putData;
|
||||
}else{
|
||||
if("rawBody" in _47){
|
||||
_49.query=_47.rawBody;
|
||||
}else{
|
||||
if((arguments.length>2&&!_48)||"POST|PUT".indexOf(_46.toUpperCase())==-1){
|
||||
_1._ioAddQueryToUrl(_49);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
xhr.open(_46,_49.url,_47.sync!==true,_47.user||undefined,_47.password||undefined);
|
||||
if(_47.headers){
|
||||
for(var hdr in _47.headers){
|
||||
if(hdr.toLowerCase()==="content-type"&&!_47.contentType){
|
||||
_47.contentType=_47.headers[hdr];
|
||||
}else{
|
||||
if(_47.headers[hdr]){
|
||||
xhr.setRequestHeader(hdr,_47.headers[hdr]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
xhr.setRequestHeader("Content-Type",_47.contentType||_41);
|
||||
if(!_47.headers||!("X-Requested-With" in _47.headers)){
|
||||
xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");
|
||||
}
|
||||
_1._ioNotifyStart(dfd);
|
||||
if(dojo.config.debugAtAllCosts){
|
||||
xhr.send(_49.query);
|
||||
}else{
|
||||
try{
|
||||
xhr.send(_49.query);
|
||||
}
|
||||
catch(e){
|
||||
_49.error=e;
|
||||
dfd.cancel();
|
||||
}
|
||||
}
|
||||
_1._ioWatch(dfd,_42,_43,_44);
|
||||
xhr=null;
|
||||
return dfd;
|
||||
};
|
||||
dojo.xhrGet=function(_4a){
|
||||
return _1.xhr("GET",_4a);
|
||||
};
|
||||
dojo.rawXhrPost=dojo.xhrPost=function(_4b){
|
||||
return _1.xhr("POST",_4b,true);
|
||||
};
|
||||
dojo.rawXhrPut=dojo.xhrPut=function(_4c){
|
||||
return _1.xhr("PUT",_4c,true);
|
||||
};
|
||||
dojo.xhrDelete=function(_4d){
|
||||
return _1.xhr("DELETE",_4d);
|
||||
};
|
||||
})();
|
||||
}
|
||||
Reference in New Issue
Block a user