You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13247 lines
342 KiB
13247 lines
342 KiB
2 years ago
|
/*
|
||
|
Copyright (c) 2004-2006, The Dojo Foundation
|
||
|
All Rights Reserved.
|
||
|
|
||
|
Licensed under the Academic Free License version 2.1 or above OR the
|
||
|
modified BSD license. For more information on Dojo licensing, see:
|
||
|
|
||
|
http://dojotoolkit.org/community/licensing.shtml
|
||
|
*/
|
||
|
|
||
|
/*
|
||
|
This is a compiled version of Dojo, built for deployment and not for
|
||
|
development. To get an editable version, please visit:
|
||
|
|
||
|
http://dojotoolkit.org
|
||
|
|
||
|
for documentation and information on getting the source.
|
||
|
*/
|
||
|
|
||
|
if(typeof dojo=="undefined"){
|
||
|
var dj_global=this;
|
||
|
var dj_currentContext=this;
|
||
|
function dj_undef(_1,_2){
|
||
|
return (typeof (_2||dj_currentContext)[_1]=="undefined");
|
||
|
}
|
||
|
if(dj_undef("djConfig",this)){
|
||
|
var djConfig={};
|
||
|
}
|
||
|
if(dj_undef("dojo",this)){
|
||
|
var dojo={};
|
||
|
}
|
||
|
dojo.global=function(){
|
||
|
return dj_currentContext;
|
||
|
};
|
||
|
dojo.locale=djConfig.locale;
|
||
|
dojo.version={major:0,minor:4,patch:3,flag:"sx",revision:Number("$Rev: 8617 $".match(/[0-9]+/)[0]),toString:function(){
|
||
|
with(dojo.version){
|
||
|
return major+"."+minor+"."+patch+flag+" ("+revision+")";
|
||
|
}
|
||
|
}};
|
||
|
dojo.evalProp=function(_3,_4,_5){
|
||
|
if((!_4)||(!_3)){
|
||
|
return undefined;
|
||
|
}
|
||
|
if(!dj_undef(_3,_4)){
|
||
|
return _4[_3];
|
||
|
}
|
||
|
return (_5?(_4[_3]={}):undefined);
|
||
|
};
|
||
|
dojo.parseObjPath=function(_6,_7,_8){
|
||
|
var _9=(_7||dojo.global());
|
||
|
var _a=_6.split(".");
|
||
|
var _b=_a.pop();
|
||
|
for(var i=0,l=_a.length;i<l&&_9;i++){
|
||
|
_9=dojo.evalProp(_a[i],_9,_8);
|
||
|
}
|
||
|
return {obj:_9,prop:_b};
|
||
|
};
|
||
|
dojo.evalObjPath=function(_e,_f){
|
||
|
if(typeof _e!="string"){
|
||
|
return dojo.global();
|
||
|
}
|
||
|
if(_e.indexOf(".")==-1){
|
||
|
return dojo.evalProp(_e,dojo.global(),_f);
|
||
|
}
|
||
|
var ref=dojo.parseObjPath(_e,dojo.global(),_f);
|
||
|
if(ref){
|
||
|
return dojo.evalProp(ref.prop,ref.obj,_f);
|
||
|
}
|
||
|
return null;
|
||
|
};
|
||
|
dojo.errorToString=function(_11){
|
||
|
if(!dj_undef("message",_11)){
|
||
|
return _11.message;
|
||
|
}else{
|
||
|
if(!dj_undef("description",_11)){
|
||
|
return _11.description;
|
||
|
}else{
|
||
|
return _11;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.raise=function(_12,_13){
|
||
|
if(_13){
|
||
|
_12=_12+": "+dojo.errorToString(_13);
|
||
|
}else{
|
||
|
_12=dojo.errorToString(_12);
|
||
|
}
|
||
|
try{
|
||
|
if(djConfig.isDebug){
|
||
|
dojo.hostenv.println("FATAL exception raised: "+_12);
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
throw _13||Error(_12);
|
||
|
};
|
||
|
dojo.debug=function(){
|
||
|
};
|
||
|
dojo.debugShallow=function(obj){
|
||
|
};
|
||
|
dojo.profile={start:function(){
|
||
|
},end:function(){
|
||
|
},stop:function(){
|
||
|
},dump:function(){
|
||
|
}};
|
||
|
function dj_eval(_15){
|
||
|
return dj_global.eval?dj_global.eval(_15):eval(_15);
|
||
|
}
|
||
|
dojo.unimplemented=function(_16,_17){
|
||
|
var _18="'"+_16+"' not implemented";
|
||
|
if(_17!=null){
|
||
|
_18+=" "+_17;
|
||
|
}
|
||
|
dojo.raise(_18);
|
||
|
};
|
||
|
dojo.deprecated=function(_19,_1a,_1b){
|
||
|
var _1c="DEPRECATED: "+_19;
|
||
|
if(_1a){
|
||
|
_1c+=" "+_1a;
|
||
|
}
|
||
|
if(_1b){
|
||
|
_1c+=" -- will be removed in version: "+_1b;
|
||
|
}
|
||
|
dojo.debug(_1c);
|
||
|
};
|
||
|
dojo.render=(function(){
|
||
|
function vscaffold(_1d,_1e){
|
||
|
var tmp={capable:false,support:{builtin:false,plugin:false},prefixes:_1d};
|
||
|
for(var i=0;i<_1e.length;i++){
|
||
|
tmp[_1e[i]]=false;
|
||
|
}
|
||
|
return tmp;
|
||
|
}
|
||
|
return {name:"",ver:dojo.version,os:{win:false,linux:false,osx:false},html:vscaffold(["html"],["ie","opera","khtml","safari","moz"]),svg:vscaffold(["svg"],["corel","adobe","batik"]),vml:vscaffold(["vml"],["ie"]),swf:vscaffold(["Swf","Flash","Mm"],["mm"]),swt:vscaffold(["Swt"],["ibm"])};
|
||
|
})();
|
||
|
dojo.hostenv=(function(){
|
||
|
var _21={isDebug:false,allowQueryConfig:false,baseScriptUri:"",baseRelativePath:"",libraryScriptUri:"",iePreventClobber:false,ieClobberMinimal:true,preventBackButtonFix:true,delayMozLoadingFix:false,searchIds:[],parseWidgets:true};
|
||
|
if(typeof djConfig=="undefined"){
|
||
|
djConfig=_21;
|
||
|
}else{
|
||
|
for(var _22 in _21){
|
||
|
if(typeof djConfig[_22]=="undefined"){
|
||
|
djConfig[_22]=_21[_22];
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return {name_:"(unset)",version_:"(unset)",getName:function(){
|
||
|
return this.name_;
|
||
|
},getVersion:function(){
|
||
|
return this.version_;
|
||
|
},getText:function(uri){
|
||
|
dojo.unimplemented("getText","uri="+uri);
|
||
|
}};
|
||
|
})();
|
||
|
dojo.hostenv.getBaseScriptUri=function(){
|
||
|
if(djConfig.baseScriptUri.length){
|
||
|
return djConfig.baseScriptUri;
|
||
|
}
|
||
|
var uri=new String(djConfig.libraryScriptUri||djConfig.baseRelativePath);
|
||
|
if(!uri){
|
||
|
dojo.raise("Nothing returned by getLibraryScriptUri(): "+uri);
|
||
|
}
|
||
|
var _25=uri.lastIndexOf("/");
|
||
|
djConfig.baseScriptUri=djConfig.baseRelativePath;
|
||
|
return djConfig.baseScriptUri;
|
||
|
};
|
||
|
(function(){
|
||
|
var _26={pkgFileName:"__package__",loading_modules_:{},loaded_modules_:{},addedToLoadingCount:[],removedFromLoadingCount:[],inFlightCount:0,modulePrefixes_:{dojo:{name:"dojo",value:"src"}},setModulePrefix:function(_27,_28){
|
||
|
this.modulePrefixes_[_27]={name:_27,value:_28};
|
||
|
},moduleHasPrefix:function(_29){
|
||
|
var mp=this.modulePrefixes_;
|
||
|
return Boolean(mp[_29]&&mp[_29].value);
|
||
|
},getModulePrefix:function(_2b){
|
||
|
if(this.moduleHasPrefix(_2b)){
|
||
|
return this.modulePrefixes_[_2b].value;
|
||
|
}
|
||
|
return _2b;
|
||
|
},getTextStack:[],loadUriStack:[],loadedUris:[],post_load_:false,modulesLoadedListeners:[],unloadListeners:[],loadNotifying:false};
|
||
|
for(var _2c in _26){
|
||
|
dojo.hostenv[_2c]=_26[_2c];
|
||
|
}
|
||
|
})();
|
||
|
dojo.hostenv.loadPath=function(_2d,_2e,cb){
|
||
|
var uri;
|
||
|
if(_2d.charAt(0)=="/"||_2d.match(/^\w+:/)){
|
||
|
uri=_2d;
|
||
|
}else{
|
||
|
uri=this.getBaseScriptUri()+_2d;
|
||
|
}
|
||
|
if(djConfig.cacheBust&&dojo.render.html.capable){
|
||
|
uri+="?"+String(djConfig.cacheBust).replace(/\W+/g,"");
|
||
|
}
|
||
|
try{
|
||
|
return !_2e?this.loadUri(uri,cb):this.loadUriAndCheck(uri,_2e,cb);
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug(e);
|
||
|
return false;
|
||
|
}
|
||
|
};
|
||
|
dojo.hostenv.loadUri=function(uri,cb){
|
||
|
if(this.loadedUris[uri]){
|
||
|
return true;
|
||
|
}
|
||
|
var _33=this.getText(uri,null,true);
|
||
|
if(!_33){
|
||
|
return false;
|
||
|
}
|
||
|
this.loadedUris[uri]=true;
|
||
|
if(cb){
|
||
|
_33="("+_33+")";
|
||
|
}
|
||
|
var _34=dj_eval(_33);
|
||
|
if(cb){
|
||
|
cb(_34);
|
||
|
}
|
||
|
return true;
|
||
|
};
|
||
|
dojo.hostenv.loadUriAndCheck=function(uri,_36,cb){
|
||
|
var ok=true;
|
||
|
try{
|
||
|
ok=this.loadUri(uri,cb);
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug("failed loading ",uri," with error: ",e);
|
||
|
}
|
||
|
return Boolean(ok&&this.findModule(_36,false));
|
||
|
};
|
||
|
dojo.loaded=function(){
|
||
|
};
|
||
|
dojo.unloaded=function(){
|
||
|
};
|
||
|
dojo.hostenv.loaded=function(){
|
||
|
this.loadNotifying=true;
|
||
|
this.post_load_=true;
|
||
|
var mll=this.modulesLoadedListeners;
|
||
|
for(var x=0;x<mll.length;x++){
|
||
|
mll[x]();
|
||
|
}
|
||
|
this.modulesLoadedListeners=[];
|
||
|
this.loadNotifying=false;
|
||
|
dojo.loaded();
|
||
|
};
|
||
|
dojo.hostenv.unloaded=function(){
|
||
|
var mll=this.unloadListeners;
|
||
|
while(mll.length){
|
||
|
(mll.pop())();
|
||
|
}
|
||
|
dojo.unloaded();
|
||
|
};
|
||
|
dojo.addOnLoad=function(obj,_3d){
|
||
|
var dh=dojo.hostenv;
|
||
|
if(arguments.length==1){
|
||
|
dh.modulesLoadedListeners.push(obj);
|
||
|
}else{
|
||
|
if(arguments.length>1){
|
||
|
dh.modulesLoadedListeners.push(function(){
|
||
|
obj[_3d]();
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){
|
||
|
dh.callLoaded();
|
||
|
}
|
||
|
};
|
||
|
dojo.addOnUnload=function(obj,_40){
|
||
|
var dh=dojo.hostenv;
|
||
|
if(arguments.length==1){
|
||
|
dh.unloadListeners.push(obj);
|
||
|
}else{
|
||
|
if(arguments.length>1){
|
||
|
dh.unloadListeners.push(function(){
|
||
|
obj[_40]();
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.hostenv.modulesLoaded=function(){
|
||
|
if(this.post_load_){
|
||
|
return;
|
||
|
}
|
||
|
if(this.loadUriStack.length==0&&this.getTextStack.length==0){
|
||
|
if(this.inFlightCount>0){
|
||
|
dojo.debug("files still in flight!");
|
||
|
return;
|
||
|
}
|
||
|
dojo.hostenv.callLoaded();
|
||
|
}
|
||
|
};
|
||
|
dojo.hostenv.callLoaded=function(){
|
||
|
if(typeof setTimeout=="object"||(djConfig["useXDomain"]&&dojo.render.html.opera)){
|
||
|
setTimeout("dojo.hostenv.loaded();",0);
|
||
|
}else{
|
||
|
dojo.hostenv.loaded();
|
||
|
}
|
||
|
};
|
||
|
dojo.hostenv.getModuleSymbols=function(_42){
|
||
|
var _43=_42.split(".");
|
||
|
for(var i=_43.length;i>0;i--){
|
||
|
var _45=_43.slice(0,i).join(".");
|
||
|
if((i==1)&&!this.moduleHasPrefix(_45)){
|
||
|
_43[0]="../"+_43[0];
|
||
|
}else{
|
||
|
var _46=this.getModulePrefix(_45);
|
||
|
if(_46!=_45){
|
||
|
_43.splice(0,i,_46);
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return _43;
|
||
|
};
|
||
|
dojo.hostenv._global_omit_module_check=false;
|
||
|
dojo.hostenv.loadModule=function(_47,_48,_49){
|
||
|
if(!_47){
|
||
|
return;
|
||
|
}
|
||
|
_49=this._global_omit_module_check||_49;
|
||
|
var _4a=this.findModule(_47,false);
|
||
|
if(_4a){
|
||
|
return _4a;
|
||
|
}
|
||
|
if(dj_undef(_47,this.loading_modules_)){
|
||
|
this.addedToLoadingCount.push(_47);
|
||
|
}
|
||
|
this.loading_modules_[_47]=1;
|
||
|
var _4b=_47.replace(/\./g,"/")+".js";
|
||
|
var _4c=_47.split(".");
|
||
|
var _4d=this.getModuleSymbols(_47);
|
||
|
var _4e=((_4d[0].charAt(0)!="/")&&!_4d[0].match(/^\w+:/));
|
||
|
var _4f=_4d[_4d.length-1];
|
||
|
var ok;
|
||
|
if(_4f=="*"){
|
||
|
_47=_4c.slice(0,-1).join(".");
|
||
|
while(_4d.length){
|
||
|
_4d.pop();
|
||
|
_4d.push(this.pkgFileName);
|
||
|
_4b=_4d.join("/")+".js";
|
||
|
if(_4e&&_4b.charAt(0)=="/"){
|
||
|
_4b=_4b.slice(1);
|
||
|
}
|
||
|
ok=this.loadPath(_4b,!_49?_47:null);
|
||
|
if(ok){
|
||
|
break;
|
||
|
}
|
||
|
_4d.pop();
|
||
|
}
|
||
|
}else{
|
||
|
_4b=_4d.join("/")+".js";
|
||
|
_47=_4c.join(".");
|
||
|
var _51=!_49?_47:null;
|
||
|
ok=this.loadPath(_4b,_51);
|
||
|
if(!ok&&!_48){
|
||
|
_4d.pop();
|
||
|
while(_4d.length){
|
||
|
_4b=_4d.join("/")+".js";
|
||
|
ok=this.loadPath(_4b,_51);
|
||
|
if(ok){
|
||
|
break;
|
||
|
}
|
||
|
_4d.pop();
|
||
|
_4b=_4d.join("/")+"/"+this.pkgFileName+".js";
|
||
|
if(_4e&&_4b.charAt(0)=="/"){
|
||
|
_4b=_4b.slice(1);
|
||
|
}
|
||
|
ok=this.loadPath(_4b,_51);
|
||
|
if(ok){
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(!ok&&!_49){
|
||
|
dojo.raise("Could not load '"+_47+"'; last tried '"+_4b+"'");
|
||
|
}
|
||
|
}
|
||
|
if(!_49&&!this["isXDomain"]){
|
||
|
_4a=this.findModule(_47,false);
|
||
|
if(!_4a){
|
||
|
dojo.raise("symbol '"+_47+"' is not defined after loading '"+_4b+"'");
|
||
|
}
|
||
|
}
|
||
|
return _4a;
|
||
|
};
|
||
|
dojo.hostenv.startPackage=function(_52){
|
||
|
var _53=String(_52);
|
||
|
var _54=_53;
|
||
|
var _55=_52.split(/\./);
|
||
|
if(_55[_55.length-1]=="*"){
|
||
|
_55.pop();
|
||
|
_54=_55.join(".");
|
||
|
}
|
||
|
var _56=dojo.evalObjPath(_54,true);
|
||
|
this.loaded_modules_[_53]=_56;
|
||
|
this.loaded_modules_[_54]=_56;
|
||
|
return _56;
|
||
|
};
|
||
|
dojo.hostenv.findModule=function(_57,_58){
|
||
|
var lmn=String(_57);
|
||
|
if(this.loaded_modules_[lmn]){
|
||
|
return this.loaded_modules_[lmn];
|
||
|
}
|
||
|
if(_58){
|
||
|
dojo.raise("no loaded module named '"+_57+"'");
|
||
|
}
|
||
|
return null;
|
||
|
};
|
||
|
dojo.kwCompoundRequire=function(_5a){
|
||
|
var _5b=_5a["common"]||[];
|
||
|
var _5c=_5a[dojo.hostenv.name_]?_5b.concat(_5a[dojo.hostenv.name_]||[]):_5b.concat(_5a["default"]||[]);
|
||
|
for(var x=0;x<_5c.length;x++){
|
||
|
var _5e=_5c[x];
|
||
|
if(_5e.constructor==Array){
|
||
|
dojo.hostenv.loadModule.apply(dojo.hostenv,_5e);
|
||
|
}else{
|
||
|
dojo.hostenv.loadModule(_5e);
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.require=function(_5f){
|
||
|
dojo.hostenv.loadModule.apply(dojo.hostenv,arguments);
|
||
|
};
|
||
|
dojo.requireIf=function(_60,_61){
|
||
|
var _62=arguments[0];
|
||
|
if((_62===true)||(_62=="common")||(_62&&dojo.render[_62].capable)){
|
||
|
var _63=[];
|
||
|
for(var i=1;i<arguments.length;i++){
|
||
|
_63.push(arguments[i]);
|
||
|
}
|
||
|
dojo.require.apply(dojo,_63);
|
||
|
}
|
||
|
};
|
||
|
dojo.requireAfterIf=dojo.requireIf;
|
||
|
dojo.provide=function(_65){
|
||
|
return dojo.hostenv.startPackage.apply(dojo.hostenv,arguments);
|
||
|
};
|
||
|
dojo.registerModulePath=function(_66,_67){
|
||
|
return dojo.hostenv.setModulePrefix(_66,_67);
|
||
|
};
|
||
|
if(djConfig["modulePaths"]){
|
||
|
for(var param in djConfig["modulePaths"]){
|
||
|
dojo.registerModulePath(param,djConfig["modulePaths"][param]);
|
||
|
}
|
||
|
}
|
||
|
dojo.setModulePrefix=function(_68,_69){
|
||
|
dojo.deprecated("dojo.setModulePrefix(\""+_68+"\", \""+_69+"\")","replaced by dojo.registerModulePath","0.5");
|
||
|
return dojo.registerModulePath(_68,_69);
|
||
|
};
|
||
|
dojo.exists=function(obj,_6b){
|
||
|
var p=_6b.split(".");
|
||
|
for(var i=0;i<p.length;i++){
|
||
|
if(!obj[p[i]]){
|
||
|
return false;
|
||
|
}
|
||
|
obj=obj[p[i]];
|
||
|
}
|
||
|
return true;
|
||
|
};
|
||
|
dojo.hostenv.normalizeLocale=function(_6e){
|
||
|
var _6f=_6e?_6e.toLowerCase():dojo.locale;
|
||
|
if(_6f=="root"){
|
||
|
_6f="ROOT";
|
||
|
}
|
||
|
return _6f;
|
||
|
};
|
||
|
dojo.hostenv.searchLocalePath=function(_70,_71,_72){
|
||
|
_70=dojo.hostenv.normalizeLocale(_70);
|
||
|
var _73=_70.split("-");
|
||
|
var _74=[];
|
||
|
for(var i=_73.length;i>0;i--){
|
||
|
_74.push(_73.slice(0,i).join("-"));
|
||
|
}
|
||
|
_74.push(false);
|
||
|
if(_71){
|
||
|
_74.reverse();
|
||
|
}
|
||
|
for(var j=_74.length-1;j>=0;j--){
|
||
|
var loc=_74[j]||"ROOT";
|
||
|
var _78=_72(loc);
|
||
|
if(_78){
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.hostenv.localesGenerated=["ROOT","es-es","es","it-it","pt-br","de","fr-fr","zh-cn","pt","en-us","zh","fr","zh-tw","it","en-gb","xx","de-de","ko-kr","ja-jp","ko","en","ja"];
|
||
|
dojo.hostenv.registerNlsPrefix=function(){
|
||
|
dojo.registerModulePath("nls","nls");
|
||
|
};
|
||
|
dojo.hostenv.preloadLocalizations=function(){
|
||
|
if(dojo.hostenv.localesGenerated){
|
||
|
dojo.hostenv.registerNlsPrefix();
|
||
|
function preload(_79){
|
||
|
_79=dojo.hostenv.normalizeLocale(_79);
|
||
|
dojo.hostenv.searchLocalePath(_79,true,function(loc){
|
||
|
for(var i=0;i<dojo.hostenv.localesGenerated.length;i++){
|
||
|
if(dojo.hostenv.localesGenerated[i]==loc){
|
||
|
dojo["require"]("nls.dojo_"+loc);
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
});
|
||
|
}
|
||
|
preload();
|
||
|
var _7c=djConfig.extraLocale||[];
|
||
|
for(var i=0;i<_7c.length;i++){
|
||
|
preload(_7c[i]);
|
||
|
}
|
||
|
}
|
||
|
dojo.hostenv.preloadLocalizations=function(){
|
||
|
};
|
||
|
};
|
||
|
dojo.requireLocalization=function(_7e,_7f,_80,_81){
|
||
|
dojo.hostenv.preloadLocalizations();
|
||
|
var _82=dojo.hostenv.normalizeLocale(_80);
|
||
|
var _83=[_7e,"nls",_7f].join(".");
|
||
|
var _84="";
|
||
|
if(_81){
|
||
|
var _85=_81.split(",");
|
||
|
for(var i=0;i<_85.length;i++){
|
||
|
if(_82.indexOf(_85[i])==0){
|
||
|
if(_85[i].length>_84.length){
|
||
|
_84=_85[i];
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(!_84){
|
||
|
_84="ROOT";
|
||
|
}
|
||
|
}
|
||
|
var _87=_81?_84:_82;
|
||
|
var _88=dojo.hostenv.findModule(_83);
|
||
|
var _89=null;
|
||
|
if(_88){
|
||
|
if(djConfig.localizationComplete&&_88._built){
|
||
|
return;
|
||
|
}
|
||
|
var _8a=_87.replace("-","_");
|
||
|
var _8b=_83+"."+_8a;
|
||
|
_89=dojo.hostenv.findModule(_8b);
|
||
|
}
|
||
|
if(!_89){
|
||
|
_88=dojo.hostenv.startPackage(_83);
|
||
|
var _8c=dojo.hostenv.getModuleSymbols(_7e);
|
||
|
var _8d=_8c.concat("nls").join("/");
|
||
|
var _8e;
|
||
|
dojo.hostenv.searchLocalePath(_87,_81,function(loc){
|
||
|
var _90=loc.replace("-","_");
|
||
|
var _91=_83+"."+_90;
|
||
|
var _92=false;
|
||
|
if(!dojo.hostenv.findModule(_91)){
|
||
|
dojo.hostenv.startPackage(_91);
|
||
|
var _93=[_8d];
|
||
|
if(loc!="ROOT"){
|
||
|
_93.push(loc);
|
||
|
}
|
||
|
_93.push(_7f);
|
||
|
var _94=_93.join("/")+".js";
|
||
|
_92=dojo.hostenv.loadPath(_94,null,function(_95){
|
||
|
var _96=function(){
|
||
|
};
|
||
|
_96.prototype=_8e;
|
||
|
_88[_90]=new _96();
|
||
|
for(var j in _95){
|
||
|
_88[_90][j]=_95[j];
|
||
|
}
|
||
|
});
|
||
|
}else{
|
||
|
_92=true;
|
||
|
}
|
||
|
if(_92&&_88[_90]){
|
||
|
_8e=_88[_90];
|
||
|
}else{
|
||
|
_88[_90]=_8e;
|
||
|
}
|
||
|
if(_81){
|
||
|
return true;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
if(_81&&_82!=_84){
|
||
|
_88[_82.replace("-","_")]=_88[_84.replace("-","_")];
|
||
|
}
|
||
|
};
|
||
|
(function(){
|
||
|
var _98=djConfig.extraLocale;
|
||
|
if(_98){
|
||
|
if(!_98 instanceof Array){
|
||
|
_98=[_98];
|
||
|
}
|
||
|
var req=dojo.requireLocalization;
|
||
|
dojo.requireLocalization=function(m,b,_9c,_9d){
|
||
|
req(m,b,_9c,_9d);
|
||
|
if(_9c){
|
||
|
return;
|
||
|
}
|
||
|
for(var i=0;i<_98.length;i++){
|
||
|
req(m,b,_98[i],_9d);
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
})();
|
||
|
}
|
||
|
if(typeof window!="undefined"){
|
||
|
(function(){
|
||
|
if(djConfig.allowQueryConfig){
|
||
|
var _9f=document.location.toString();
|
||
|
var _a0=_9f.split("?",2);
|
||
|
if(_a0.length>1){
|
||
|
var _a1=_a0[1];
|
||
|
var _a2=_a1.split("&");
|
||
|
for(var x in _a2){
|
||
|
var sp=_a2[x].split("=");
|
||
|
if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){
|
||
|
var opt=sp[0].substr(9);
|
||
|
try{
|
||
|
djConfig[opt]=eval(sp[1]);
|
||
|
}
|
||
|
catch(e){
|
||
|
djConfig[opt]=sp[1];
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){
|
||
|
var _a6=document.getElementsByTagName("script");
|
||
|
var _a7=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;
|
||
|
for(var i=0;i<_a6.length;i++){
|
||
|
var src=_a6[i].getAttribute("src");
|
||
|
if(!src){
|
||
|
continue;
|
||
|
}
|
||
|
var m=src.match(_a7);
|
||
|
if(m){
|
||
|
var _ab=src.substring(0,m.index);
|
||
|
if(src.indexOf("bootstrap1")>-1){
|
||
|
_ab+="../";
|
||
|
}
|
||
|
if(!this["djConfig"]){
|
||
|
djConfig={};
|
||
|
}
|
||
|
if(djConfig["baseScriptUri"]==""){
|
||
|
djConfig["baseScriptUri"]=_ab;
|
||
|
}
|
||
|
if(djConfig["baseRelativePath"]==""){
|
||
|
djConfig["baseRelativePath"]=_ab;
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
var dr=dojo.render;
|
||
|
var drh=dojo.render.html;
|
||
|
var drs=dojo.render.svg;
|
||
|
var dua=(drh.UA=navigator.userAgent);
|
||
|
var dav=(drh.AV=navigator.appVersion);
|
||
|
var t=true;
|
||
|
var f=false;
|
||
|
drh.capable=t;
|
||
|
drh.support.builtin=t;
|
||
|
dr.ver=parseFloat(drh.AV);
|
||
|
dr.os.mac=dav.indexOf("Macintosh")>=0;
|
||
|
dr.os.win=dav.indexOf("Windows")>=0;
|
||
|
dr.os.linux=dav.indexOf("X11")>=0;
|
||
|
drh.opera=dua.indexOf("Opera")>=0;
|
||
|
drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0);
|
||
|
drh.safari=dav.indexOf("Safari")>=0;
|
||
|
var _b3=dua.indexOf("Gecko");
|
||
|
drh.mozilla=drh.moz=(_b3>=0)&&(!drh.khtml);
|
||
|
if(drh.mozilla){
|
||
|
drh.geckoVersion=dua.substring(_b3+6,_b3+14);
|
||
|
}
|
||
|
drh.ie=(document.all)&&(!drh.opera);
|
||
|
drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0;
|
||
|
drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0;
|
||
|
drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0;
|
||
|
drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0;
|
||
|
var cm=document["compatMode"];
|
||
|
drh.quirks=(cm=="BackCompat")||(cm=="QuirksMode")||drh.ie55||drh.ie50;
|
||
|
dojo.locale=dojo.locale||(drh.ie?navigator.userLanguage:navigator.language).toLowerCase();
|
||
|
dr.vml.capable=drh.ie;
|
||
|
drs.capable=f;
|
||
|
drs.support.plugin=f;
|
||
|
drs.support.builtin=f;
|
||
|
var _b5=window["document"];
|
||
|
var tdi=_b5["implementation"];
|
||
|
if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){
|
||
|
drs.capable=t;
|
||
|
drs.support.builtin=t;
|
||
|
drs.support.plugin=f;
|
||
|
}
|
||
|
if(drh.safari){
|
||
|
var tmp=dua.split("AppleWebKit/")[1];
|
||
|
var ver=parseFloat(tmp.split(" ")[0]);
|
||
|
if(ver>=420){
|
||
|
drs.capable=t;
|
||
|
drs.support.builtin=t;
|
||
|
drs.support.plugin=f;
|
||
|
}
|
||
|
}else{
|
||
|
}
|
||
|
})();
|
||
|
dojo.hostenv.startPackage("dojo.hostenv");
|
||
|
dojo.render.name=dojo.hostenv.name_="browser";
|
||
|
dojo.hostenv.searchIds=[];
|
||
|
dojo.hostenv._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
|
||
|
dojo.hostenv.getXmlhttpObject=function(){
|
||
|
var _b9=null;
|
||
|
var _ba=null;
|
||
|
try{
|
||
|
_b9=new XMLHttpRequest();
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
if(!_b9){
|
||
|
for(var i=0;i<3;++i){
|
||
|
var _bc=dojo.hostenv._XMLHTTP_PROGIDS[i];
|
||
|
try{
|
||
|
_b9=new ActiveXObject(_bc);
|
||
|
}
|
||
|
catch(e){
|
||
|
_ba=e;
|
||
|
}
|
||
|
if(_b9){
|
||
|
dojo.hostenv._XMLHTTP_PROGIDS=[_bc];
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(!_b9){
|
||
|
return dojo.raise("XMLHTTP not available",_ba);
|
||
|
}
|
||
|
return _b9;
|
||
|
};
|
||
|
dojo.hostenv._blockAsync=false;
|
||
|
dojo.hostenv.getText=function(uri,_be,_bf){
|
||
|
if(!_be){
|
||
|
this._blockAsync=true;
|
||
|
}
|
||
|
var _c0=this.getXmlhttpObject();
|
||
|
function isDocumentOk(_c1){
|
||
|
var _c2=_c1["status"];
|
||
|
return Boolean((!_c2)||((200<=_c2)&&(300>_c2))||(_c2==304));
|
||
|
}
|
||
|
if(_be){
|
||
|
var _c3=this,_c4=null,gbl=dojo.global();
|
||
|
var xhr=dojo.evalObjPath("dojo.io.XMLHTTPTransport");
|
||
|
_c0.onreadystatechange=function(){
|
||
|
if(_c4){
|
||
|
gbl.clearTimeout(_c4);
|
||
|
_c4=null;
|
||
|
}
|
||
|
if(_c3._blockAsync||(xhr&&xhr._blockAsync)){
|
||
|
_c4=gbl.setTimeout(function(){
|
||
|
_c0.onreadystatechange.apply(this);
|
||
|
},10);
|
||
|
}else{
|
||
|
if(4==_c0.readyState){
|
||
|
if(isDocumentOk(_c0)){
|
||
|
_be(_c0.responseText);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
_c0.open("GET",uri,_be?true:false);
|
||
|
try{
|
||
|
_c0.send(null);
|
||
|
if(_be){
|
||
|
return null;
|
||
|
}
|
||
|
if(!isDocumentOk(_c0)){
|
||
|
var err=Error("Unable to load "+uri+" status:"+_c0.status);
|
||
|
err.status=_c0.status;
|
||
|
err.responseText=_c0.responseText;
|
||
|
throw err;
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
this._blockAsync=false;
|
||
|
if((_bf)&&(!_be)){
|
||
|
return null;
|
||
|
}else{
|
||
|
throw e;
|
||
|
}
|
||
|
}
|
||
|
this._blockAsync=false;
|
||
|
return _c0.responseText;
|
||
|
};
|
||
|
dojo.hostenv.defaultDebugContainerId="dojoDebug";
|
||
|
dojo.hostenv._println_buffer=[];
|
||
|
dojo.hostenv._println_safe=false;
|
||
|
dojo.hostenv.println=function(_c8){
|
||
|
if(!dojo.hostenv._println_safe){
|
||
|
dojo.hostenv._println_buffer.push(_c8);
|
||
|
}else{
|
||
|
try{
|
||
|
var _c9=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);
|
||
|
if(!_c9){
|
||
|
_c9=dojo.body();
|
||
|
}
|
||
|
var div=document.createElement("div");
|
||
|
div.appendChild(document.createTextNode(_c8));
|
||
|
_c9.appendChild(div);
|
||
|
}
|
||
|
catch(e){
|
||
|
try{
|
||
|
document.write("<div>"+_c8+"</div>");
|
||
|
}
|
||
|
catch(e2){
|
||
|
window.status=_c8;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.addOnLoad(function(){
|
||
|
dojo.hostenv._println_safe=true;
|
||
|
while(dojo.hostenv._println_buffer.length>0){
|
||
|
dojo.hostenv.println(dojo.hostenv._println_buffer.shift());
|
||
|
}
|
||
|
});
|
||
|
function dj_addNodeEvtHdlr(_cb,_cc,fp){
|
||
|
var _ce=_cb["on"+_cc]||function(){
|
||
|
};
|
||
|
_cb["on"+_cc]=function(){
|
||
|
fp.apply(_cb,arguments);
|
||
|
_ce.apply(_cb,arguments);
|
||
|
};
|
||
|
return true;
|
||
|
}
|
||
|
dojo.hostenv._djInitFired=false;
|
||
|
function dj_load_init(e){
|
||
|
dojo.hostenv._djInitFired=true;
|
||
|
var _d0=(e&&e.type)?e.type.toLowerCase():"load";
|
||
|
if(arguments.callee.initialized||(_d0!="domcontentloaded"&&_d0!="load")){
|
||
|
return;
|
||
|
}
|
||
|
arguments.callee.initialized=true;
|
||
|
if(typeof (_timer)!="undefined"){
|
||
|
clearInterval(_timer);
|
||
|
delete _timer;
|
||
|
}
|
||
|
var _d1=function(){
|
||
|
if(dojo.render.html.ie){
|
||
|
dojo.hostenv.makeWidgets();
|
||
|
}
|
||
|
};
|
||
|
if(dojo.hostenv.inFlightCount==0){
|
||
|
_d1();
|
||
|
dojo.hostenv.modulesLoaded();
|
||
|
}else{
|
||
|
dojo.hostenv.modulesLoadedListeners.unshift(_d1);
|
||
|
}
|
||
|
}
|
||
|
if(document.addEventListener){
|
||
|
if(dojo.render.html.opera||(dojo.render.html.moz&&(djConfig["enableMozDomContentLoaded"]===true))){
|
||
|
document.addEventListener("DOMContentLoaded",dj_load_init,null);
|
||
|
}
|
||
|
window.addEventListener("load",dj_load_init,null);
|
||
|
}
|
||
|
if(dojo.render.html.ie&&dojo.render.os.win){
|
||
|
document.attachEvent("onreadystatechange",function(e){
|
||
|
if(document.readyState=="complete"){
|
||
|
dj_load_init();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
if(/(WebKit|khtml)/i.test(navigator.userAgent)){
|
||
|
var _timer=setInterval(function(){
|
||
|
if(/loaded|complete/.test(document.readyState)){
|
||
|
dj_load_init();
|
||
|
}
|
||
|
},10);
|
||
|
}
|
||
|
if(dojo.render.html.ie){
|
||
|
dj_addNodeEvtHdlr(window,"beforeunload",function(){
|
||
|
dojo.hostenv._unloading=true;
|
||
|
window.setTimeout(function(){
|
||
|
dojo.hostenv._unloading=false;
|
||
|
},0);
|
||
|
});
|
||
|
}
|
||
|
dj_addNodeEvtHdlr(window,"unload",function(){
|
||
|
dojo.hostenv.unloaded();
|
||
|
if((!dojo.render.html.ie)||(dojo.render.html.ie&&dojo.hostenv._unloading)){
|
||
|
dojo.hostenv.unloaded();
|
||
|
}
|
||
|
});
|
||
|
dojo.hostenv.makeWidgets=function(){
|
||
|
var _d3=[];
|
||
|
if(djConfig.searchIds&&djConfig.searchIds.length>0){
|
||
|
_d3=_d3.concat(djConfig.searchIds);
|
||
|
}
|
||
|
if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){
|
||
|
_d3=_d3.concat(dojo.hostenv.searchIds);
|
||
|
}
|
||
|
if((djConfig.parseWidgets)||(_d3.length>0)){
|
||
|
if(dojo.evalObjPath("dojo.widget.Parse")){
|
||
|
var _d4=new dojo.xml.Parse();
|
||
|
if(_d3.length>0){
|
||
|
for(var x=0;x<_d3.length;x++){
|
||
|
var _d6=document.getElementById(_d3[x]);
|
||
|
if(!_d6){
|
||
|
continue;
|
||
|
}
|
||
|
var _d7=_d4.parseElement(_d6,null,true);
|
||
|
dojo.widget.getParser().createComponents(_d7);
|
||
|
}
|
||
|
}else{
|
||
|
if(djConfig.parseWidgets){
|
||
|
var _d7=_d4.parseElement(dojo.body(),null,true);
|
||
|
dojo.widget.getParser().createComponents(_d7);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.addOnLoad(function(){
|
||
|
if(!dojo.render.html.ie){
|
||
|
dojo.hostenv.makeWidgets();
|
||
|
}
|
||
|
});
|
||
|
try{
|
||
|
if(dojo.render.html.ie){
|
||
|
document.namespaces.add("v","urn:schemas-microsoft-com:vml");
|
||
|
document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
dojo.hostenv.writeIncludes=function(){
|
||
|
};
|
||
|
if(!dj_undef("document",this)){
|
||
|
dj_currentDocument=this.document;
|
||
|
}
|
||
|
dojo.doc=function(){
|
||
|
return dj_currentDocument;
|
||
|
};
|
||
|
dojo.body=function(){
|
||
|
return dojo.doc().body||dojo.doc().getElementsByTagName("body")[0];
|
||
|
};
|
||
|
dojo.byId=function(id,doc){
|
||
|
if((id)&&((typeof id=="string")||(id instanceof String))){
|
||
|
if(!doc){
|
||
|
doc=dj_currentDocument;
|
||
|
}
|
||
|
var ele=doc.getElementById(id);
|
||
|
if(ele&&(ele.id!=id)&&doc.all){
|
||
|
ele=null;
|
||
|
eles=doc.all[id];
|
||
|
if(eles){
|
||
|
if(eles.length){
|
||
|
for(var i=0;i<eles.length;i++){
|
||
|
if(eles[i].id==id){
|
||
|
ele=eles[i];
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}else{
|
||
|
ele=eles;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return ele;
|
||
|
}
|
||
|
return id;
|
||
|
};
|
||
|
dojo.setContext=function(_dc,_dd){
|
||
|
dj_currentContext=_dc;
|
||
|
dj_currentDocument=_dd;
|
||
|
};
|
||
|
dojo._fireCallback=function(_de,_df,_e0){
|
||
|
if((_df)&&((typeof _de=="string")||(_de instanceof String))){
|
||
|
_de=_df[_de];
|
||
|
}
|
||
|
return (_df?_de.apply(_df,_e0||[]):_de());
|
||
|
};
|
||
|
dojo.withGlobal=function(_e1,_e2,_e3,_e4){
|
||
|
var _e5;
|
||
|
var _e6=dj_currentContext;
|
||
|
var _e7=dj_currentDocument;
|
||
|
try{
|
||
|
dojo.setContext(_e1,_e1.document);
|
||
|
_e5=dojo._fireCallback(_e2,_e3,_e4);
|
||
|
}
|
||
|
finally{
|
||
|
dojo.setContext(_e6,_e7);
|
||
|
}
|
||
|
return _e5;
|
||
|
};
|
||
|
dojo.withDoc=function(_e8,_e9,_ea,_eb){
|
||
|
var _ec;
|
||
|
var _ed=dj_currentDocument;
|
||
|
try{
|
||
|
dj_currentDocument=_e8;
|
||
|
_ec=dojo._fireCallback(_e9,_ea,_eb);
|
||
|
}
|
||
|
finally{
|
||
|
dj_currentDocument=_ed;
|
||
|
}
|
||
|
return _ec;
|
||
|
};
|
||
|
}
|
||
|
dojo.requireIf((djConfig["isDebug"]||djConfig["debugAtAllCosts"]),"dojo.debug");
|
||
|
dojo.requireIf(djConfig["debugAtAllCosts"]&&!window.widget&&!djConfig["useXDomain"],"dojo.browser_debug");
|
||
|
dojo.requireIf(djConfig["debugAtAllCosts"]&&!window.widget&&djConfig["useXDomain"],"dojo.browser_debug_xd");
|
||
|
dojo.provide("dojo.string.common");
|
||
|
dojo.string.trim=function(str,wh){
|
||
|
if(!str.replace){
|
||
|
return str;
|
||
|
}
|
||
|
if(!str.length){
|
||
|
return str;
|
||
|
}
|
||
|
var re=(wh>0)?(/^\s+/):(wh<0)?(/\s+$/):(/^\s+|\s+$/g);
|
||
|
return str.replace(re,"");
|
||
|
};
|
||
|
dojo.string.trimStart=function(str){
|
||
|
return dojo.string.trim(str,1);
|
||
|
};
|
||
|
dojo.string.trimEnd=function(str){
|
||
|
return dojo.string.trim(str,-1);
|
||
|
};
|
||
|
dojo.string.repeat=function(str,_f4,_f5){
|
||
|
var out="";
|
||
|
for(var i=0;i<_f4;i++){
|
||
|
out+=str;
|
||
|
if(_f5&&i<_f4-1){
|
||
|
out+=_f5;
|
||
|
}
|
||
|
}
|
||
|
return out;
|
||
|
};
|
||
|
dojo.string.pad=function(str,len,c,dir){
|
||
|
var out=String(str);
|
||
|
if(!c){
|
||
|
c="0";
|
||
|
}
|
||
|
if(!dir){
|
||
|
dir=1;
|
||
|
}
|
||
|
while(out.length<len){
|
||
|
if(dir>0){
|
||
|
out=c+out;
|
||
|
}else{
|
||
|
out+=c;
|
||
|
}
|
||
|
}
|
||
|
return out;
|
||
|
};
|
||
|
dojo.string.padLeft=function(str,len,c){
|
||
|
return dojo.string.pad(str,len,c,1);
|
||
|
};
|
||
|
dojo.string.padRight=function(str,len,c){
|
||
|
return dojo.string.pad(str,len,c,-1);
|
||
|
};
|
||
|
dojo.provide("dojo.string");
|
||
|
dojo.provide("dojo.lang.common");
|
||
|
dojo.lang.inherits=function(_103,_104){
|
||
|
if(!dojo.lang.isFunction(_104)){
|
||
|
dojo.raise("dojo.inherits: superclass argument ["+_104+"] must be a function (subclass: ["+_103+"']");
|
||
|
}
|
||
|
_103.prototype=new _104();
|
||
|
_103.prototype.constructor=_103;
|
||
|
_103.superclass=_104.prototype;
|
||
|
_103["super"]=_104.prototype;
|
||
|
};
|
||
|
dojo.lang._mixin=function(obj,_106){
|
||
|
var tobj={};
|
||
|
for(var x in _106){
|
||
|
if((typeof tobj[x]=="undefined")||(tobj[x]!=_106[x])){
|
||
|
obj[x]=_106[x];
|
||
|
}
|
||
|
}
|
||
|
if(dojo.render.html.ie&&(typeof (_106["toString"])=="function")&&(_106["toString"]!=obj["toString"])&&(_106["toString"]!=tobj["toString"])){
|
||
|
obj.toString=_106.toString;
|
||
|
}
|
||
|
return obj;
|
||
|
};
|
||
|
dojo.lang.mixin=function(obj,_10a){
|
||
|
for(var i=1,l=arguments.length;i<l;i++){
|
||
|
dojo.lang._mixin(obj,arguments[i]);
|
||
|
}
|
||
|
return obj;
|
||
|
};
|
||
|
dojo.lang.extend=function(_10d,_10e){
|
||
|
for(var i=1,l=arguments.length;i<l;i++){
|
||
|
dojo.lang._mixin(_10d.prototype,arguments[i]);
|
||
|
}
|
||
|
return _10d;
|
||
|
};
|
||
|
dojo.inherits=dojo.lang.inherits;
|
||
|
dojo.mixin=dojo.lang.mixin;
|
||
|
dojo.extend=dojo.lang.extend;
|
||
|
dojo.lang.find=function(_111,_112,_113,_114){
|
||
|
if(!dojo.lang.isArrayLike(_111)&&dojo.lang.isArrayLike(_112)){
|
||
|
dojo.deprecated("dojo.lang.find(value, array)","use dojo.lang.find(array, value) instead","0.5");
|
||
|
var temp=_111;
|
||
|
_111=_112;
|
||
|
_112=temp;
|
||
|
}
|
||
|
var _116=dojo.lang.isString(_111);
|
||
|
if(_116){
|
||
|
_111=_111.split("");
|
||
|
}
|
||
|
if(_114){
|
||
|
var step=-1;
|
||
|
var i=_111.length-1;
|
||
|
var end=-1;
|
||
|
}else{
|
||
|
var step=1;
|
||
|
var i=0;
|
||
|
var end=_111.length;
|
||
|
}
|
||
|
if(_113){
|
||
|
while(i!=end){
|
||
|
if(_111[i]===_112){
|
||
|
return i;
|
||
|
}
|
||
|
i+=step;
|
||
|
}
|
||
|
}else{
|
||
|
while(i!=end){
|
||
|
if(_111[i]==_112){
|
||
|
return i;
|
||
|
}
|
||
|
i+=step;
|
||
|
}
|
||
|
}
|
||
|
return -1;
|
||
|
};
|
||
|
dojo.lang.indexOf=dojo.lang.find;
|
||
|
dojo.lang.findLast=function(_11a,_11b,_11c){
|
||
|
return dojo.lang.find(_11a,_11b,_11c,true);
|
||
|
};
|
||
|
dojo.lang.lastIndexOf=dojo.lang.findLast;
|
||
|
dojo.lang.inArray=function(_11d,_11e){
|
||
|
return dojo.lang.find(_11d,_11e)>-1;
|
||
|
};
|
||
|
dojo.lang.isObject=function(it){
|
||
|
if(typeof it=="undefined"){
|
||
|
return false;
|
||
|
}
|
||
|
return (typeof it=="object"||it===null||dojo.lang.isArray(it)||dojo.lang.isFunction(it));
|
||
|
};
|
||
|
dojo.lang.isArray=function(it){
|
||
|
return (it&&it instanceof Array||typeof it=="array");
|
||
|
};
|
||
|
dojo.lang.isArrayLike=function(it){
|
||
|
if((!it)||(dojo.lang.isUndefined(it))){
|
||
|
return false;
|
||
|
}
|
||
|
if(dojo.lang.isString(it)){
|
||
|
return false;
|
||
|
}
|
||
|
if(dojo.lang.isFunction(it)){
|
||
|
return false;
|
||
|
}
|
||
|
if(dojo.lang.isArray(it)){
|
||
|
return true;
|
||
|
}
|
||
|
if((it.tagName)&&(it.tagName.toLowerCase()=="form")){
|
||
|
return false;
|
||
|
}
|
||
|
if(dojo.lang.isNumber(it.length)&&isFinite(it.length)){
|
||
|
return true;
|
||
|
}
|
||
|
return false;
|
||
|
};
|
||
|
dojo.lang.isFunction=function(it){
|
||
|
return (it instanceof Function||typeof it=="function");
|
||
|
};
|
||
|
(function(){
|
||
|
if((dojo.render.html.capable)&&(dojo.render.html["safari"])){
|
||
|
dojo.lang.isFunction=function(it){
|
||
|
if((typeof (it)=="function")&&(it=="[object NodeList]")){
|
||
|
return false;
|
||
|
}
|
||
|
return (it instanceof Function||typeof it=="function");
|
||
|
};
|
||
|
}
|
||
|
})();
|
||
|
dojo.lang.isString=function(it){
|
||
|
return (typeof it=="string"||it instanceof String);
|
||
|
};
|
||
|
dojo.lang.isAlien=function(it){
|
||
|
if(!it){
|
||
|
return false;
|
||
|
}
|
||
|
return !dojo.lang.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));
|
||
|
};
|
||
|
dojo.lang.isBoolean=function(it){
|
||
|
return (it instanceof Boolean||typeof it=="boolean");
|
||
|
};
|
||
|
dojo.lang.isNumber=function(it){
|
||
|
return (it instanceof Number||typeof it=="number");
|
||
|
};
|
||
|
dojo.lang.isUndefined=function(it){
|
||
|
return ((typeof (it)=="undefined")&&(it==undefined));
|
||
|
};
|
||
|
dojo.provide("dojo.lang.extras");
|
||
|
dojo.lang.setTimeout=function(func,_12a){
|
||
|
var _12b=window,_12c=2;
|
||
|
if(!dojo.lang.isFunction(func)){
|
||
|
_12b=func;
|
||
|
func=_12a;
|
||
|
_12a=arguments[2];
|
||
|
_12c++;
|
||
|
}
|
||
|
if(dojo.lang.isString(func)){
|
||
|
func=_12b[func];
|
||
|
}
|
||
|
var args=[];
|
||
|
for(var i=_12c;i<arguments.length;i++){
|
||
|
args.push(arguments[i]);
|
||
|
}
|
||
|
return dojo.global().setTimeout(function(){
|
||
|
func.apply(_12b,args);
|
||
|
},_12a);
|
||
|
};
|
||
|
dojo.lang.clearTimeout=function(_12f){
|
||
|
dojo.global().clearTimeout(_12f);
|
||
|
};
|
||
|
dojo.lang.getNameInObj=function(ns,item){
|
||
|
if(!ns){
|
||
|
ns=dj_global;
|
||
|
}
|
||
|
for(var x in ns){
|
||
|
if(ns[x]===item){
|
||
|
return new String(x);
|
||
|
}
|
||
|
}
|
||
|
return null;
|
||
|
};
|
||
|
dojo.lang.shallowCopy=function(obj,deep){
|
||
|
var i,ret;
|
||
|
if(obj===null){
|
||
|
return null;
|
||
|
}
|
||
|
if(dojo.lang.isObject(obj)){
|
||
|
ret=new obj.constructor();
|
||
|
for(i in obj){
|
||
|
if(dojo.lang.isUndefined(ret[i])){
|
||
|
ret[i]=deep?dojo.lang.shallowCopy(obj[i],deep):obj[i];
|
||
|
}
|
||
|
}
|
||
|
}else{
|
||
|
if(dojo.lang.isArray(obj)){
|
||
|
ret=[];
|
||
|
for(i=0;i<obj.length;i++){
|
||
|
ret[i]=deep?dojo.lang.shallowCopy(obj[i],deep):obj[i];
|
||
|
}
|
||
|
}else{
|
||
|
ret=obj;
|
||
|
}
|
||
|
}
|
||
|
return ret;
|
||
|
};
|
||
|
dojo.lang.firstValued=function(){
|
||
|
for(var i=0;i<arguments.length;i++){
|
||
|
if(typeof arguments[i]!="undefined"){
|
||
|
return arguments[i];
|
||
|
}
|
||
|
}
|
||
|
return undefined;
|
||
|
};
|
||
|
dojo.lang.getObjPathValue=function(_138,_139,_13a){
|
||
|
with(dojo.parseObjPath(_138,_139,_13a)){
|
||
|
return dojo.evalProp(prop,obj,_13a);
|
||
|
}
|
||
|
};
|
||
|
dojo.lang.setObjPathValue=function(_13b,_13c,_13d,_13e){
|
||
|
dojo.deprecated("dojo.lang.setObjPathValue","use dojo.parseObjPath and the '=' operator","0.6");
|
||
|
if(arguments.length<4){
|
||
|
_13e=true;
|
||
|
}
|
||
|
with(dojo.parseObjPath(_13b,_13d,_13e)){
|
||
|
if(obj&&(_13e||(prop in obj))){
|
||
|
obj[prop]=_13c;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.provide("dojo.io.common");
|
||
|
dojo.io.transports=[];
|
||
|
dojo.io.hdlrFuncNames=["load","error","timeout"];
|
||
|
dojo.io.Request=function(url,_140,_141,_142){
|
||
|
if((arguments.length==1)&&(arguments[0].constructor==Object)){
|
||
|
this.fromKwArgs(arguments[0]);
|
||
|
}else{
|
||
|
this.url=url;
|
||
|
if(_140){
|
||
|
this.mimetype=_140;
|
||
|
}
|
||
|
if(_141){
|
||
|
this.transport=_141;
|
||
|
}
|
||
|
if(arguments.length>=4){
|
||
|
this.changeUrl=_142;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.lang.extend(dojo.io.Request,{url:"",mimetype:"text/plain",method:"GET",content:undefined,transport:undefined,changeUrl:undefined,formNode:undefined,sync:false,bindSuccess:false,useCache:false,preventCache:false,jsonFilter:function(_143){
|
||
|
if((this.mimetype=="text/json-comment-filtered")||(this.mimetype=="application/json-comment-filtered")){
|
||
|
var _144=_143.indexOf("/*");
|
||
|
var _145=_143.lastIndexOf("*/");
|
||
|
if((_144==-1)||(_145==-1)){
|
||
|
dojo.debug("your JSON wasn't comment filtered!");
|
||
|
return "";
|
||
|
}
|
||
|
return _143.substring(_144+2,_145);
|
||
|
}
|
||
|
dojo.debug("please consider using a mimetype of text/json-comment-filtered to avoid potential security issues with JSON endpoints");
|
||
|
return _143;
|
||
|
},load:function(type,data,_148,_149){
|
||
|
},error:function(type,_14b,_14c,_14d){
|
||
|
},timeout:function(type,_14f,_150,_151){
|
||
|
},handle:function(type,data,_154,_155){
|
||
|
},timeoutSeconds:0,abort:function(){
|
||
|
},fromKwArgs:function(_156){
|
||
|
if(_156["url"]){
|
||
|
_156.url=_156.url.toString();
|
||
|
}
|
||
|
if(_156["formNode"]){
|
||
|
_156.formNode=dojo.byId(_156.formNode);
|
||
|
}
|
||
|
if(!_156["method"]&&_156["formNode"]&&_156["formNode"].method){
|
||
|
_156.method=_156["formNode"].method;
|
||
|
}
|
||
|
if(!_156["handle"]&&_156["handler"]){
|
||
|
_156.handle=_156.handler;
|
||
|
}
|
||
|
if(!_156["load"]&&_156["loaded"]){
|
||
|
_156.load=_156.loaded;
|
||
|
}
|
||
|
if(!_156["changeUrl"]&&_156["changeURL"]){
|
||
|
_156.changeUrl=_156.changeURL;
|
||
|
}
|
||
|
_156.encoding=dojo.lang.firstValued(_156["encoding"],djConfig["bindEncoding"],"");
|
||
|
_156.sendTransport=dojo.lang.firstValued(_156["sendTransport"],djConfig["ioSendTransport"],false);
|
||
|
var _157=dojo.lang.isFunction;
|
||
|
for(var x=0;x<dojo.io.hdlrFuncNames.length;x++){
|
||
|
var fn=dojo.io.hdlrFuncNames[x];
|
||
|
if(_156[fn]&&_157(_156[fn])){
|
||
|
continue;
|
||
|
}
|
||
|
if(_156["handle"]&&_157(_156["handle"])){
|
||
|
_156[fn]=_156.handle;
|
||
|
}
|
||
|
}
|
||
|
dojo.lang.mixin(this,_156);
|
||
|
}});
|
||
|
dojo.io.Error=function(msg,type,num){
|
||
|
this.message=msg;
|
||
|
this.type=type||"unknown";
|
||
|
this.number=num||0;
|
||
|
};
|
||
|
dojo.io.transports.addTransport=function(name){
|
||
|
this.push(name);
|
||
|
this[name]=dojo.io[name];
|
||
|
};
|
||
|
dojo.io.bind=function(_15e){
|
||
|
if(!(_15e instanceof dojo.io.Request)){
|
||
|
try{
|
||
|
_15e=new dojo.io.Request(_15e);
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug(e);
|
||
|
}
|
||
|
}
|
||
|
var _15f="";
|
||
|
if(_15e["transport"]){
|
||
|
_15f=_15e["transport"];
|
||
|
if(!this[_15f]){
|
||
|
dojo.io.sendBindError(_15e,"No dojo.io.bind() transport with name '"+_15e["transport"]+"'.");
|
||
|
return _15e;
|
||
|
}
|
||
|
if(!this[_15f].canHandle(_15e)){
|
||
|
dojo.io.sendBindError(_15e,"dojo.io.bind() transport with name '"+_15e["transport"]+"' cannot handle this type of request.");
|
||
|
return _15e;
|
||
|
}
|
||
|
}else{
|
||
|
for(var x=0;x<dojo.io.transports.length;x++){
|
||
|
var tmp=dojo.io.transports[x];
|
||
|
if((this[tmp])&&(this[tmp].canHandle(_15e))){
|
||
|
_15f=tmp;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
if(_15f==""){
|
||
|
dojo.io.sendBindError(_15e,"None of the loaded transports for dojo.io.bind()"+" can handle the request.");
|
||
|
return _15e;
|
||
|
}
|
||
|
}
|
||
|
this[_15f].bind(_15e);
|
||
|
_15e.bindSuccess=true;
|
||
|
return _15e;
|
||
|
};
|
||
|
dojo.io.sendBindError=function(_162,_163){
|
||
|
if((typeof _162.error=="function"||typeof _162.handle=="function")&&(typeof setTimeout=="function"||typeof setTimeout=="object")){
|
||
|
var _164=new dojo.io.Error(_163);
|
||
|
setTimeout(function(){
|
||
|
_162[(typeof _162.error=="function")?"error":"handle"]("error",_164,null,_162);
|
||
|
},50);
|
||
|
}else{
|
||
|
dojo.raise(_163);
|
||
|
}
|
||
|
};
|
||
|
dojo.io.queueBind=function(_165){
|
||
|
if(!(_165 instanceof dojo.io.Request)){
|
||
|
try{
|
||
|
_165=new dojo.io.Request(_165);
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug(e);
|
||
|
}
|
||
|
}
|
||
|
var _166=_165.load;
|
||
|
_165.load=function(){
|
||
|
dojo.io._queueBindInFlight=false;
|
||
|
var ret=_166.apply(this,arguments);
|
||
|
dojo.io._dispatchNextQueueBind();
|
||
|
return ret;
|
||
|
};
|
||
|
var _168=_165.error;
|
||
|
_165.error=function(){
|
||
|
dojo.io._queueBindInFlight=false;
|
||
|
var ret=_168.apply(this,arguments);
|
||
|
dojo.io._dispatchNextQueueBind();
|
||
|
return ret;
|
||
|
};
|
||
|
dojo.io._bindQueue.push(_165);
|
||
|
dojo.io._dispatchNextQueueBind();
|
||
|
return _165;
|
||
|
};
|
||
|
dojo.io._dispatchNextQueueBind=function(){
|
||
|
if(!dojo.io._queueBindInFlight){
|
||
|
dojo.io._queueBindInFlight=true;
|
||
|
if(dojo.io._bindQueue.length>0){
|
||
|
dojo.io.bind(dojo.io._bindQueue.shift());
|
||
|
}else{
|
||
|
dojo.io._queueBindInFlight=false;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.io._bindQueue=[];
|
||
|
dojo.io._queueBindInFlight=false;
|
||
|
dojo.io.argsFromMap=function(map,_16b,last){
|
||
|
var enc=/utf/i.test(_16b||"")?encodeURIComponent:dojo.string.encodeAscii;
|
||
|
var _16e=[];
|
||
|
var _16f=new Object();
|
||
|
for(var name in map){
|
||
|
var _171=function(elt){
|
||
|
var val=enc(name)+"="+enc(elt);
|
||
|
_16e[(last==name)?"push":"unshift"](val);
|
||
|
};
|
||
|
if(!_16f[name]){
|
||
|
var _174=map[name];
|
||
|
if(dojo.lang.isArray(_174)){
|
||
|
dojo.lang.forEach(_174,_171);
|
||
|
}else{
|
||
|
_171(_174);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return _16e.join("&");
|
||
|
};
|
||
|
dojo.io.setIFrameSrc=function(_175,src,_177){
|
||
|
try{
|
||
|
var r=dojo.render.html;
|
||
|
if(!_177){
|
||
|
if(r.safari){
|
||
|
_175.location=src;
|
||
|
}else{
|
||
|
frames[_175.name].location=src;
|
||
|
}
|
||
|
}else{
|
||
|
var idoc;
|
||
|
if(r.ie){
|
||
|
idoc=_175.contentWindow.document;
|
||
|
}else{
|
||
|
if(r.safari){
|
||
|
idoc=_175.document;
|
||
|
}else{
|
||
|
idoc=_175.contentWindow;
|
||
|
}
|
||
|
}
|
||
|
if(!idoc){
|
||
|
_175.location=src;
|
||
|
return;
|
||
|
}else{
|
||
|
idoc.location.replace(src);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug(e);
|
||
|
dojo.debug("setIFrameSrc: "+e);
|
||
|
}
|
||
|
};
|
||
|
dojo.provide("dojo.lang.array");
|
||
|
dojo.lang.mixin(dojo.lang,{has:function(obj,name){
|
||
|
try{
|
||
|
return typeof obj[name]!="undefined";
|
||
|
}
|
||
|
catch(e){
|
||
|
return false;
|
||
|
}
|
||
|
},isEmpty:function(obj){
|
||
|
if(dojo.lang.isObject(obj)){
|
||
|
var tmp={};
|
||
|
var _17e=0;
|
||
|
for(var x in obj){
|
||
|
if(obj[x]&&(!tmp[x])){
|
||
|
_17e++;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
return _17e==0;
|
||
|
}else{
|
||
|
if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){
|
||
|
return obj.length==0;
|
||
|
}
|
||
|
}
|
||
|
},map:function(arr,obj,_182){
|
||
|
var _183=dojo.lang.isString(arr);
|
||
|
if(_183){
|
||
|
arr=arr.split("");
|
||
|
}
|
||
|
if(dojo.lang.isFunction(obj)&&(!_182)){
|
||
|
_182=obj;
|
||
|
obj=dj_global;
|
||
|
}else{
|
||
|
if(dojo.lang.isFunction(obj)&&_182){
|
||
|
var _184=obj;
|
||
|
obj=_182;
|
||
|
_182=_184;
|
||
|
}
|
||
|
}
|
||
|
if(Array.map){
|
||
|
var _185=Array.map(arr,_182,obj);
|
||
|
}else{
|
||
|
var _185=[];
|
||
|
for(var i=0;i<arr.length;++i){
|
||
|
_185.push(_182.call(obj,arr[i]));
|
||
|
}
|
||
|
}
|
||
|
if(_183){
|
||
|
return _185.join("");
|
||
|
}else{
|
||
|
return _185;
|
||
|
}
|
||
|
},reduce:function(arr,_188,obj,_18a){
|
||
|
var _18b=_188;
|
||
|
if(arguments.length==2){
|
||
|
_18a=_188;
|
||
|
_18b=arr[0];
|
||
|
arr=arr.slice(1);
|
||
|
}else{
|
||
|
if(arguments.length==3){
|
||
|
if(dojo.lang.isFunction(obj)){
|
||
|
_18a=obj;
|
||
|
obj=null;
|
||
|
}
|
||
|
}else{
|
||
|
if(dojo.lang.isFunction(obj)){
|
||
|
var tmp=_18a;
|
||
|
_18a=obj;
|
||
|
obj=tmp;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
var ob=obj||dj_global;
|
||
|
dojo.lang.map(arr,function(val){
|
||
|
_18b=_18a.call(ob,_18b,val);
|
||
|
});
|
||
|
return _18b;
|
||
|
},forEach:function(_18f,_190,_191){
|
||
|
if(dojo.lang.isString(_18f)){
|
||
|
_18f=_18f.split("");
|
||
|
}
|
||
|
if(Array.forEach){
|
||
|
Array.forEach(_18f,_190,_191);
|
||
|
}else{
|
||
|
if(!_191){
|
||
|
_191=dj_global;
|
||
|
}
|
||
|
for(var i=0,l=_18f.length;i<l;i++){
|
||
|
_190.call(_191,_18f[i],i,_18f);
|
||
|
}
|
||
|
}
|
||
|
},_everyOrSome:function(_194,arr,_196,_197){
|
||
|
if(dojo.lang.isString(arr)){
|
||
|
arr=arr.split("");
|
||
|
}
|
||
|
if(Array.every){
|
||
|
return Array[_194?"every":"some"](arr,_196,_197);
|
||
|
}else{
|
||
|
if(!_197){
|
||
|
_197=dj_global;
|
||
|
}
|
||
|
for(var i=0,l=arr.length;i<l;i++){
|
||
|
var _19a=_196.call(_197,arr[i],i,arr);
|
||
|
if(_194&&!_19a){
|
||
|
return false;
|
||
|
}else{
|
||
|
if((!_194)&&(_19a)){
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return Boolean(_194);
|
||
|
}
|
||
|
},every:function(arr,_19c,_19d){
|
||
|
return this._everyOrSome(true,arr,_19c,_19d);
|
||
|
},some:function(arr,_19f,_1a0){
|
||
|
return this._everyOrSome(false,arr,_19f,_1a0);
|
||
|
},filter:function(arr,_1a2,_1a3){
|
||
|
var _1a4=dojo.lang.isString(arr);
|
||
|
if(_1a4){
|
||
|
arr=arr.split("");
|
||
|
}
|
||
|
var _1a5;
|
||
|
if(Array.filter){
|
||
|
_1a5=Array.filter(arr,_1a2,_1a3);
|
||
|
}else{
|
||
|
if(!_1a3){
|
||
|
if(arguments.length>=3){
|
||
|
dojo.raise("thisObject doesn't exist!");
|
||
|
}
|
||
|
_1a3=dj_global;
|
||
|
}
|
||
|
_1a5=[];
|
||
|
for(var i=0;i<arr.length;i++){
|
||
|
if(_1a2.call(_1a3,arr[i],i,arr)){
|
||
|
_1a5.push(arr[i]);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(_1a4){
|
||
|
return _1a5.join("");
|
||
|
}else{
|
||
|
return _1a5;
|
||
|
}
|
||
|
},unnest:function(){
|
||
|
var out=[];
|
||
|
for(var i=0;i<arguments.length;i++){
|
||
|
if(dojo.lang.isArrayLike(arguments[i])){
|
||
|
var add=dojo.lang.unnest.apply(this,arguments[i]);
|
||
|
out=out.concat(add);
|
||
|
}else{
|
||
|
out.push(arguments[i]);
|
||
|
}
|
||
|
}
|
||
|
return out;
|
||
|
},toArray:function(_1aa,_1ab){
|
||
|
var _1ac=[];
|
||
|
for(var i=_1ab||0;i<_1aa.length;i++){
|
||
|
_1ac.push(_1aa[i]);
|
||
|
}
|
||
|
return _1ac;
|
||
|
}});
|
||
|
dojo.provide("dojo.lang.func");
|
||
|
dojo.lang.hitch=function(_1ae,_1af){
|
||
|
var args=[];
|
||
|
for(var x=2;x<arguments.length;x++){
|
||
|
args.push(arguments[x]);
|
||
|
}
|
||
|
var fcn=(dojo.lang.isString(_1af)?_1ae[_1af]:_1af)||function(){
|
||
|
};
|
||
|
return function(){
|
||
|
var ta=args.concat([]);
|
||
|
for(var x=0;x<arguments.length;x++){
|
||
|
ta.push(arguments[x]);
|
||
|
}
|
||
|
return fcn.apply(_1ae,ta);
|
||
|
};
|
||
|
};
|
||
|
dojo.lang.anonCtr=0;
|
||
|
dojo.lang.anon={};
|
||
|
dojo.lang.nameAnonFunc=function(_1b5,_1b6,_1b7){
|
||
|
var nso=(_1b6||dojo.lang.anon);
|
||
|
if((_1b7)||((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"]==true))){
|
||
|
for(var x in nso){
|
||
|
try{
|
||
|
if(nso[x]===_1b5){
|
||
|
return x;
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
var ret="__"+dojo.lang.anonCtr++;
|
||
|
while(typeof nso[ret]!="undefined"){
|
||
|
ret="__"+dojo.lang.anonCtr++;
|
||
|
}
|
||
|
nso[ret]=_1b5;
|
||
|
return ret;
|
||
|
};
|
||
|
dojo.lang.forward=function(_1bb){
|
||
|
return function(){
|
||
|
return this[_1bb].apply(this,arguments);
|
||
|
};
|
||
|
};
|
||
|
dojo.lang.curry=function(_1bc,func){
|
||
|
var _1be=[];
|
||
|
_1bc=_1bc||dj_global;
|
||
|
if(dojo.lang.isString(func)){
|
||
|
func=_1bc[func];
|
||
|
}
|
||
|
for(var x=2;x<arguments.length;x++){
|
||
|
_1be.push(arguments[x]);
|
||
|
}
|
||
|
var _1c0=(func["__preJoinArity"]||func.length)-_1be.length;
|
||
|
function gather(_1c1,_1c2,_1c3){
|
||
|
var _1c4=_1c3;
|
||
|
var _1c5=_1c2.slice(0);
|
||
|
for(var x=0;x<_1c1.length;x++){
|
||
|
_1c5.push(_1c1[x]);
|
||
|
}
|
||
|
_1c3=_1c3-_1c1.length;
|
||
|
if(_1c3<=0){
|
||
|
var res=func.apply(_1bc,_1c5);
|
||
|
_1c3=_1c4;
|
||
|
return res;
|
||
|
}else{
|
||
|
return function(){
|
||
|
return gather(arguments,_1c5,_1c3);
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
return gather([],_1be,_1c0);
|
||
|
};
|
||
|
dojo.lang.curryArguments=function(_1c8,func,args,_1cb){
|
||
|
var _1cc=[];
|
||
|
var x=_1cb||0;
|
||
|
for(x=_1cb;x<args.length;x++){
|
||
|
_1cc.push(args[x]);
|
||
|
}
|
||
|
return dojo.lang.curry.apply(dojo.lang,[_1c8,func].concat(_1cc));
|
||
|
};
|
||
|
dojo.lang.tryThese=function(){
|
||
|
for(var x=0;x<arguments.length;x++){
|
||
|
try{
|
||
|
if(typeof arguments[x]=="function"){
|
||
|
var ret=(arguments[x]());
|
||
|
if(ret){
|
||
|
return ret;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug(e);
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.lang.delayThese=function(farr,cb,_1d2,_1d3){
|
||
|
if(!farr.length){
|
||
|
if(typeof _1d3=="function"){
|
||
|
_1d3();
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
if((typeof _1d2=="undefined")&&(typeof cb=="number")){
|
||
|
_1d2=cb;
|
||
|
cb=function(){
|
||
|
};
|
||
|
}else{
|
||
|
if(!cb){
|
||
|
cb=function(){
|
||
|
};
|
||
|
if(!_1d2){
|
||
|
_1d2=0;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
setTimeout(function(){
|
||
|
(farr.shift())();
|
||
|
cb();
|
||
|
dojo.lang.delayThese(farr,cb,_1d2,_1d3);
|
||
|
},_1d2);
|
||
|
};
|
||
|
dojo.provide("dojo.string.extras");
|
||
|
dojo.string.substituteParams=function(_1d4,hash){
|
||
|
var map=(typeof hash=="object")?hash:dojo.lang.toArray(arguments,1);
|
||
|
return _1d4.replace(/\%\{(\w+)\}/g,function(_1d7,key){
|
||
|
if(typeof (map[key])!="undefined"&&map[key]!=null){
|
||
|
return map[key];
|
||
|
}
|
||
|
dojo.raise("Substitution not found: "+key);
|
||
|
});
|
||
|
};
|
||
|
dojo.string.capitalize=function(str){
|
||
|
if(!dojo.lang.isString(str)){
|
||
|
return "";
|
||
|
}
|
||
|
if(arguments.length==0){
|
||
|
str=this;
|
||
|
}
|
||
|
var _1da=str.split(" ");
|
||
|
for(var i=0;i<_1da.length;i++){
|
||
|
_1da[i]=_1da[i].charAt(0).toUpperCase()+_1da[i].substring(1);
|
||
|
}
|
||
|
return _1da.join(" ");
|
||
|
};
|
||
|
dojo.string.isBlank=function(str){
|
||
|
if(!dojo.lang.isString(str)){
|
||
|
return true;
|
||
|
}
|
||
|
return (dojo.string.trim(str).length==0);
|
||
|
};
|
||
|
dojo.string.encodeAscii=function(str){
|
||
|
if(!dojo.lang.isString(str)){
|
||
|
return str;
|
||
|
}
|
||
|
var ret="";
|
||
|
var _1df=escape(str);
|
||
|
var _1e0,re=/%u([0-9A-F]{4})/i;
|
||
|
while((_1e0=_1df.match(re))){
|
||
|
var num=Number("0x"+_1e0[1]);
|
||
|
var _1e3=escape("&#"+num+";");
|
||
|
ret+=_1df.substring(0,_1e0.index)+_1e3;
|
||
|
_1df=_1df.substring(_1e0.index+_1e0[0].length);
|
||
|
}
|
||
|
ret+=_1df.replace(/\+/g,"%2B");
|
||
|
return ret;
|
||
|
};
|
||
|
dojo.string.escape=function(type,str){
|
||
|
var args=dojo.lang.toArray(arguments,1);
|
||
|
switch(type.toLowerCase()){
|
||
|
case "xml":
|
||
|
case "html":
|
||
|
case "xhtml":
|
||
|
return dojo.string.escapeXml.apply(this,args);
|
||
|
case "sql":
|
||
|
return dojo.string.escapeSql.apply(this,args);
|
||
|
case "regexp":
|
||
|
case "regex":
|
||
|
return dojo.string.escapeRegExp.apply(this,args);
|
||
|
case "javascript":
|
||
|
case "jscript":
|
||
|
case "js":
|
||
|
return dojo.string.escapeJavaScript.apply(this,args);
|
||
|
case "ascii":
|
||
|
return dojo.string.encodeAscii.apply(this,args);
|
||
|
default:
|
||
|
return str;
|
||
|
}
|
||
|
};
|
||
|
dojo.string.escapeXml=function(str,_1e8){
|
||
|
str=str.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">").replace(/"/gm,""");
|
||
|
if(!_1e8){
|
||
|
str=str.replace(/'/gm,"'");
|
||
|
}
|
||
|
return str;
|
||
|
};
|
||
|
dojo.string.escapeSql=function(str){
|
||
|
return str.replace(/'/gm,"''");
|
||
|
};
|
||
|
dojo.string.escapeRegExp=function(str){
|
||
|
return str.replace(/\\/gm,"\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm,"\\$1");
|
||
|
};
|
||
|
dojo.string.escapeJavaScript=function(str){
|
||
|
return str.replace(/(["'\f\b\n\t\r])/gm,"\\$1");
|
||
|
};
|
||
|
dojo.string.escapeString=function(str){
|
||
|
return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");
|
||
|
};
|
||
|
dojo.string.summary=function(str,len){
|
||
|
if(!len||str.length<=len){
|
||
|
return str;
|
||
|
}
|
||
|
return str.substring(0,len).replace(/\.+$/,"")+"...";
|
||
|
};
|
||
|
dojo.string.endsWith=function(str,end,_1f1){
|
||
|
if(_1f1){
|
||
|
str=str.toLowerCase();
|
||
|
end=end.toLowerCase();
|
||
|
}
|
||
|
if((str.length-end.length)<0){
|
||
|
return false;
|
||
|
}
|
||
|
return str.lastIndexOf(end)==str.length-end.length;
|
||
|
};
|
||
|
dojo.string.endsWithAny=function(str){
|
||
|
for(var i=1;i<arguments.length;i++){
|
||
|
if(dojo.string.endsWith(str,arguments[i])){
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
};
|
||
|
dojo.string.startsWith=function(str,_1f5,_1f6){
|
||
|
if(_1f6){
|
||
|
str=str.toLowerCase();
|
||
|
_1f5=_1f5.toLowerCase();
|
||
|
}
|
||
|
return str.indexOf(_1f5)==0;
|
||
|
};
|
||
|
dojo.string.startsWithAny=function(str){
|
||
|
for(var i=1;i<arguments.length;i++){
|
||
|
if(dojo.string.startsWith(str,arguments[i])){
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
};
|
||
|
dojo.string.has=function(str){
|
||
|
for(var i=1;i<arguments.length;i++){
|
||
|
if(str.indexOf(arguments[i])>-1){
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
};
|
||
|
dojo.string.normalizeNewlines=function(text,_1fc){
|
||
|
if(_1fc=="\n"){
|
||
|
text=text.replace(/\r\n/g,"\n");
|
||
|
text=text.replace(/\r/g,"\n");
|
||
|
}else{
|
||
|
if(_1fc=="\r"){
|
||
|
text=text.replace(/\r\n/g,"\r");
|
||
|
text=text.replace(/\n/g,"\r");
|
||
|
}else{
|
||
|
text=text.replace(/([^\r])\n/g,"$1\r\n").replace(/\r([^\n])/g,"\r\n$1");
|
||
|
}
|
||
|
}
|
||
|
return text;
|
||
|
};
|
||
|
dojo.string.splitEscaped=function(str,_1fe){
|
||
|
var _1ff=[];
|
||
|
for(var i=0,_201=0;i<str.length;i++){
|
||
|
if(str.charAt(i)=="\\"){
|
||
|
i++;
|
||
|
continue;
|
||
|
}
|
||
|
if(str.charAt(i)==_1fe){
|
||
|
_1ff.push(str.substring(_201,i));
|
||
|
_201=i+1;
|
||
|
}
|
||
|
}
|
||
|
_1ff.push(str.substr(_201));
|
||
|
return _1ff;
|
||
|
};
|
||
|
dojo.provide("dojo.dom");
|
||
|
dojo.dom.ELEMENT_NODE=1;
|
||
|
dojo.dom.ATTRIBUTE_NODE=2;
|
||
|
dojo.dom.TEXT_NODE=3;
|
||
|
dojo.dom.CDATA_SECTION_NODE=4;
|
||
|
dojo.dom.ENTITY_REFERENCE_NODE=5;
|
||
|
dojo.dom.ENTITY_NODE=6;
|
||
|
dojo.dom.PROCESSING_INSTRUCTION_NODE=7;
|
||
|
dojo.dom.COMMENT_NODE=8;
|
||
|
dojo.dom.DOCUMENT_NODE=9;
|
||
|
dojo.dom.DOCUMENT_TYPE_NODE=10;
|
||
|
dojo.dom.DOCUMENT_FRAGMENT_NODE=11;
|
||
|
dojo.dom.NOTATION_NODE=12;
|
||
|
dojo.dom.dojoml="http://www.dojotoolkit.org/2004/dojoml";
|
||
|
dojo.dom.xmlns={svg:"http://www.w3.org/2000/svg",smil:"http://www.w3.org/2001/SMIL20/",mml:"http://www.w3.org/1998/Math/MathML",cml:"http://www.xml-cml.org",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml",xul:"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",xbl:"http://www.mozilla.org/xbl",fo:"http://www.w3.org/1999/XSL/Format",xsl:"http://www.w3.org/1999/XSL/Transform",xslt:"http://www.w3.org/1999/XSL/Transform",xi:"http://www.w3.org/2001/XInclude",xforms:"http://www.w3.org/2002/01/xforms",saxon:"http://icl.com/saxon",xalan:"http://xml.apache.org/xslt",xsd:"http://www.w3.org/2001/XMLSchema",dt:"http://www.w3.org/2001/XMLSchema-datatypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",dc:"http://purl.org/dc/elements/1.1/",dcq:"http://purl.org/dc/qualifiers/1.0","soap-env":"http://schemas.xmlsoap.org/soap/envelope/",wsdl:"http://schemas.xmlsoap.org/wsdl/",AdobeExtensions:"http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"};
|
||
|
dojo.dom.isNode=function(wh){
|
||
|
if(typeof Element=="function"){
|
||
|
try{
|
||
|
return wh instanceof Element;
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
}else{
|
||
|
return wh&&!isNaN(wh.nodeType);
|
||
|
}
|
||
|
};
|
||
|
dojo.dom.getUniqueId=function(){
|
||
|
var _203=dojo.doc();
|
||
|
do{
|
||
|
var id="dj_unique_"+(++arguments.callee._idIncrement);
|
||
|
}while(_203.getElementById(id));
|
||
|
return id;
|
||
|
};
|
||
|
dojo.dom.getUniqueId._idIncrement=0;
|
||
|
dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_205,_206){
|
||
|
var node=_205.firstChild;
|
||
|
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
|
||
|
node=node.nextSibling;
|
||
|
}
|
||
|
if(_206&&node&&node.tagName&&node.tagName.toLowerCase()!=_206.toLowerCase()){
|
||
|
node=dojo.dom.nextElement(node,_206);
|
||
|
}
|
||
|
return node;
|
||
|
};
|
||
|
dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_208,_209){
|
||
|
var node=_208.lastChild;
|
||
|
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
|
||
|
node=node.previousSibling;
|
||
|
}
|
||
|
if(_209&&node&&node.tagName&&node.tagName.toLowerCase()!=_209.toLowerCase()){
|
||
|
node=dojo.dom.prevElement(node,_209);
|
||
|
}
|
||
|
return node;
|
||
|
};
|
||
|
dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(node,_20c){
|
||
|
if(!node){
|
||
|
return null;
|
||
|
}
|
||
|
do{
|
||
|
node=node.nextSibling;
|
||
|
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
|
||
|
if(node&&_20c&&_20c.toLowerCase()!=node.tagName.toLowerCase()){
|
||
|
return dojo.dom.nextElement(node,_20c);
|
||
|
}
|
||
|
return node;
|
||
|
};
|
||
|
dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(node,_20e){
|
||
|
if(!node){
|
||
|
return null;
|
||
|
}
|
||
|
if(_20e){
|
||
|
_20e=_20e.toLowerCase();
|
||
|
}
|
||
|
do{
|
||
|
node=node.previousSibling;
|
||
|
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
|
||
|
if(node&&_20e&&_20e.toLowerCase()!=node.tagName.toLowerCase()){
|
||
|
return dojo.dom.prevElement(node,_20e);
|
||
|
}
|
||
|
return node;
|
||
|
};
|
||
|
dojo.dom.moveChildren=function(_20f,_210,trim){
|
||
|
var _212=0;
|
||
|
if(trim){
|
||
|
while(_20f.hasChildNodes()&&_20f.firstChild.nodeType==dojo.dom.TEXT_NODE){
|
||
|
_20f.removeChild(_20f.firstChild);
|
||
|
}
|
||
|
while(_20f.hasChildNodes()&&_20f.lastChild.nodeType==dojo.dom.TEXT_NODE){
|
||
|
_20f.removeChild(_20f.lastChild);
|
||
|
}
|
||
|
}
|
||
|
while(_20f.hasChildNodes()){
|
||
|
_210.appendChild(_20f.firstChild);
|
||
|
_212++;
|
||
|
}
|
||
|
return _212;
|
||
|
};
|
||
|
dojo.dom.copyChildren=function(_213,_214,trim){
|
||
|
var _216=_213.cloneNode(true);
|
||
|
return this.moveChildren(_216,_214,trim);
|
||
|
};
|
||
|
dojo.dom.replaceChildren=function(node,_218){
|
||
|
var _219=[];
|
||
|
if(dojo.render.html.ie){
|
||
|
for(var i=0;i<node.childNodes.length;i++){
|
||
|
_219.push(node.childNodes[i]);
|
||
|
}
|
||
|
}
|
||
|
dojo.dom.removeChildren(node);
|
||
|
node.appendChild(_218);
|
||
|
for(var i=0;i<_219.length;i++){
|
||
|
dojo.dom.destroyNode(_219[i]);
|
||
|
}
|
||
|
};
|
||
|
dojo.dom.removeChildren=function(node){
|
||
|
var _21c=node.childNodes.length;
|
||
|
while(node.hasChildNodes()){
|
||
|
dojo.dom.removeNode(node.firstChild);
|
||
|
}
|
||
|
return _21c;
|
||
|
};
|
||
|
dojo.dom.replaceNode=function(node,_21e){
|
||
|
return node.parentNode.replaceChild(_21e,node);
|
||
|
};
|
||
|
dojo.dom.destroyNode=function(node){
|
||
|
if(node.parentNode){
|
||
|
node=dojo.dom.removeNode(node);
|
||
|
}
|
||
|
if(node.nodeType!=3){
|
||
|
if(dojo.evalObjPath("dojo.event.browser.clean",false)){
|
||
|
dojo.event.browser.clean(node);
|
||
|
}
|
||
|
if(dojo.render.html.ie){
|
||
|
node.outerHTML="";
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.dom.removeNode=function(node){
|
||
|
if(node&&node.parentNode){
|
||
|
return node.parentNode.removeChild(node);
|
||
|
}
|
||
|
};
|
||
|
dojo.dom.getAncestors=function(node,_222,_223){
|
||
|
var _224=[];
|
||
|
var _225=(_222&&(_222 instanceof Function||typeof _222=="function"));
|
||
|
while(node){
|
||
|
if(!_225||_222(node)){
|
||
|
_224.push(node);
|
||
|
}
|
||
|
if(_223&&_224.length>0){
|
||
|
return _224[0];
|
||
|
}
|
||
|
node=node.parentNode;
|
||
|
}
|
||
|
if(_223){
|
||
|
return null;
|
||
|
}
|
||
|
return _224;
|
||
|
};
|
||
|
dojo.dom.getAncestorsByTag=function(node,tag,_228){
|
||
|
tag=tag.toLowerCase();
|
||
|
return dojo.dom.getAncestors(node,function(el){
|
||
|
return ((el.tagName)&&(el.tagName.toLowerCase()==tag));
|
||
|
},_228);
|
||
|
};
|
||
|
dojo.dom.getFirstAncestorByTag=function(node,tag){
|
||
|
return dojo.dom.getAncestorsByTag(node,tag,true);
|
||
|
};
|
||
|
dojo.dom.isDescendantOf=function(node,_22d,_22e){
|
||
|
if(_22e&&node){
|
||
|
node=node.parentNode;
|
||
|
}
|
||
|
while(node){
|
||
|
if(node==_22d){
|
||
|
return true;
|
||
|
}
|
||
|
node=node.parentNode;
|
||
|
}
|
||
|
return false;
|
||
|
};
|
||
|
dojo.dom.innerXML=function(node){
|
||
|
if(node.innerXML){
|
||
|
return node.innerXML;
|
||
|
}else{
|
||
|
if(node.xml){
|
||
|
return node.xml;
|
||
|
}else{
|
||
|
if(typeof XMLSerializer!="undefined"){
|
||
|
return (new XMLSerializer()).serializeToString(node);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.dom.createDocument=function(){
|
||
|
var doc=null;
|
||
|
var _231=dojo.doc();
|
||
|
if(!dj_undef("ActiveXObject")){
|
||
|
var _232=["MSXML2","Microsoft","MSXML","MSXML3"];
|
||
|
for(var i=0;i<_232.length;i++){
|
||
|
try{
|
||
|
doc=new ActiveXObject(_232[i]+".XMLDOM");
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
if(doc){
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}else{
|
||
|
if((_231.implementation)&&(_231.implementation.createDocument)){
|
||
|
doc=_231.implementation.createDocument("","",null);
|
||
|
}
|
||
|
}
|
||
|
return doc;
|
||
|
};
|
||
|
dojo.dom.createDocumentFromText=function(str,_235){
|
||
|
if(!_235){
|
||
|
_235="text/xml";
|
||
|
}
|
||
|
if(!dj_undef("DOMParser")){
|
||
|
var _236=new DOMParser();
|
||
|
return _236.parseFromString(str,_235);
|
||
|
}else{
|
||
|
if(!dj_undef("ActiveXObject")){
|
||
|
var _237=dojo.dom.createDocument();
|
||
|
if(_237){
|
||
|
_237.async=false;
|
||
|
_237.loadXML(str);
|
||
|
return _237;
|
||
|
}else{
|
||
|
dojo.debug("toXml didn't work?");
|
||
|
}
|
||
|
}else{
|
||
|
var _238=dojo.doc();
|
||
|
if(_238.createElement){
|
||
|
var tmp=_238.createElement("xml");
|
||
|
tmp.innerHTML=str;
|
||
|
if(_238.implementation&&_238.implementation.createDocument){
|
||
|
var _23a=_238.implementation.createDocument("foo","",null);
|
||
|
for(var i=0;i<tmp.childNodes.length;i++){
|
||
|
_23a.importNode(tmp.childNodes.item(i),true);
|
||
|
}
|
||
|
return _23a;
|
||
|
}
|
||
|
return ((tmp.document)&&(tmp.document.firstChild?tmp.document.firstChild:tmp));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return null;
|
||
|
};
|
||
|
dojo.dom.prependChild=function(node,_23d){
|
||
|
if(_23d.firstChild){
|
||
|
_23d.insertBefore(node,_23d.firstChild);
|
||
|
}else{
|
||
|
_23d.appendChild(node);
|
||
|
}
|
||
|
return true;
|
||
|
};
|
||
|
dojo.dom.insertBefore=function(node,ref,_240){
|
||
|
if((_240!=true)&&(node===ref||node.nextSibling===ref)){
|
||
|
return false;
|
||
|
}
|
||
|
var _241=ref.parentNode;
|
||
|
_241.insertBefore(node,ref);
|
||
|
return true;
|
||
|
};
|
||
|
dojo.dom.insertAfter=function(node,ref,_244){
|
||
|
var pn=ref.parentNode;
|
||
|
if(ref==pn.lastChild){
|
||
|
if((_244!=true)&&(node===ref)){
|
||
|
return false;
|
||
|
}
|
||
|
pn.appendChild(node);
|
||
|
}else{
|
||
|
return this.insertBefore(node,ref.nextSibling,_244);
|
||
|
}
|
||
|
return true;
|
||
|
};
|
||
|
dojo.dom.insertAtPosition=function(node,ref,_248){
|
||
|
if((!node)||(!ref)||(!_248)){
|
||
|
return false;
|
||
|
}
|
||
|
switch(_248.toLowerCase()){
|
||
|
case "before":
|
||
|
return dojo.dom.insertBefore(node,ref);
|
||
|
case "after":
|
||
|
return dojo.dom.insertAfter(node,ref);
|
||
|
case "first":
|
||
|
if(ref.firstChild){
|
||
|
return dojo.dom.insertBefore(node,ref.firstChild);
|
||
|
}else{
|
||
|
ref.appendChild(node);
|
||
|
return true;
|
||
|
}
|
||
|
break;
|
||
|
default:
|
||
|
ref.appendChild(node);
|
||
|
return true;
|
||
|
}
|
||
|
};
|
||
|
dojo.dom.insertAtIndex=function(node,_24a,_24b){
|
||
|
var _24c=_24a.childNodes;
|
||
|
if(!_24c.length||_24c.length==_24b){
|
||
|
_24a.appendChild(node);
|
||
|
return true;
|
||
|
}
|
||
|
if(_24b==0){
|
||
|
return dojo.dom.prependChild(node,_24a);
|
||
|
}
|
||
|
return dojo.dom.insertAfter(node,_24c[_24b-1]);
|
||
|
};
|
||
|
dojo.dom.textContent=function(node,text){
|
||
|
if(arguments.length>1){
|
||
|
var _24f=dojo.doc();
|
||
|
dojo.dom.replaceChildren(node,_24f.createTextNode(text));
|
||
|
return text;
|
||
|
}else{
|
||
|
if(node.textContent!=undefined){
|
||
|
return node.textContent;
|
||
|
}
|
||
|
var _250="";
|
||
|
if(node==null){
|
||
|
return _250;
|
||
|
}
|
||
|
for(var i=0;i<node.childNodes.length;i++){
|
||
|
switch(node.childNodes[i].nodeType){
|
||
|
case 1:
|
||
|
case 5:
|
||
|
_250+=dojo.dom.textContent(node.childNodes[i]);
|
||
|
break;
|
||
|
case 3:
|
||
|
case 2:
|
||
|
case 4:
|
||
|
_250+=node.childNodes[i].nodeValue;
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
return _250;
|
||
|
}
|
||
|
};
|
||
|
dojo.dom.hasParent=function(node){
|
||
|
return Boolean(node&&node.parentNode&&dojo.dom.isNode(node.parentNode));
|
||
|
};
|
||
|
dojo.dom.isTag=function(node){
|
||
|
if(node&&node.tagName){
|
||
|
for(var i=1;i<arguments.length;i++){
|
||
|
if(node.tagName==String(arguments[i])){
|
||
|
return String(arguments[i]);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return "";
|
||
|
};
|
||
|
dojo.dom.setAttributeNS=function(elem,_256,_257,_258){
|
||
|
if(elem==null||((elem==undefined)&&(typeof elem=="undefined"))){
|
||
|
dojo.raise("No element given to dojo.dom.setAttributeNS");
|
||
|
}
|
||
|
if(!((elem.setAttributeNS==undefined)&&(typeof elem.setAttributeNS=="undefined"))){
|
||
|
elem.setAttributeNS(_256,_257,_258);
|
||
|
}else{
|
||
|
var _259=elem.ownerDocument;
|
||
|
var _25a=_259.createNode(2,_257,_256);
|
||
|
_25a.nodeValue=_258;
|
||
|
elem.setAttributeNode(_25a);
|
||
|
}
|
||
|
};
|
||
|
dojo.provide("dojo.undo.browser");
|
||
|
try{
|
||
|
if((!djConfig["preventBackButtonFix"])&&(!dojo.hostenv.post_load_)){
|
||
|
document.write("<iframe style='border: 0px; width: 1px; height: 1px; position: absolute; bottom: 0px; right: 0px; visibility: visible;' name='djhistory' id='djhistory' src='"+(djConfig["dojoIframeHistoryUrl"]||dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"'></iframe>");
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
if(dojo.render.html.opera){
|
||
|
dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work.");
|
||
|
}
|
||
|
dojo.undo.browser={initialHref:(!dj_undef("window"))?window.location.href:"",initialHash:(!dj_undef("window"))?window.location.hash:"",moveForward:false,historyStack:[],forwardStack:[],historyIframe:null,bookmarkAnchor:null,locationTimer:null,setInitialState:function(args){
|
||
|
this.initialState=this._createState(this.initialHref,args,this.initialHash);
|
||
|
},addToHistory:function(args){
|
||
|
this.forwardStack=[];
|
||
|
var hash=null;
|
||
|
var url=null;
|
||
|
if(!this.historyIframe){
|
||
|
if(djConfig["useXDomain"]&&!djConfig["dojoIframeHistoryUrl"]){
|
||
|
dojo.debug("dojo.undo.browser: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html");
|
||
|
}
|
||
|
this.historyIframe=window.frames["djhistory"];
|
||
|
}
|
||
|
if(!this.bookmarkAnchor){
|
||
|
this.bookmarkAnchor=document.createElement("a");
|
||
|
dojo.body().appendChild(this.bookmarkAnchor);
|
||
|
this.bookmarkAnchor.style.display="none";
|
||
|
}
|
||
|
if(args["changeUrl"]){
|
||
|
hash="#"+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());
|
||
|
if(this.historyStack.length==0&&this.initialState.urlHash==hash){
|
||
|
this.initialState=this._createState(url,args,hash);
|
||
|
return;
|
||
|
}else{
|
||
|
if(this.historyStack.length>0&&this.historyStack[this.historyStack.length-1].urlHash==hash){
|
||
|
this.historyStack[this.historyStack.length-1]=this._createState(url,args,hash);
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
this.changingUrl=true;
|
||
|
setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;",1);
|
||
|
this.bookmarkAnchor.href=hash;
|
||
|
if(dojo.render.html.ie){
|
||
|
url=this._loadIframeHistory();
|
||
|
var _25f=args["back"]||args["backButton"]||args["handle"];
|
||
|
var tcb=function(_261){
|
||
|
if(window.location.hash!=""){
|
||
|
setTimeout("window.location.href = '"+hash+"';",1);
|
||
|
}
|
||
|
_25f.apply(this,[_261]);
|
||
|
};
|
||
|
if(args["back"]){
|
||
|
args.back=tcb;
|
||
|
}else{
|
||
|
if(args["backButton"]){
|
||
|
args.backButton=tcb;
|
||
|
}else{
|
||
|
if(args["handle"]){
|
||
|
args.handle=tcb;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
var _262=args["forward"]||args["forwardButton"]||args["handle"];
|
||
|
var tfw=function(_264){
|
||
|
if(window.location.hash!=""){
|
||
|
window.location.href=hash;
|
||
|
}
|
||
|
if(_262){
|
||
|
_262.apply(this,[_264]);
|
||
|
}
|
||
|
};
|
||
|
if(args["forward"]){
|
||
|
args.forward=tfw;
|
||
|
}else{
|
||
|
if(args["forwardButton"]){
|
||
|
args.forwardButton=tfw;
|
||
|
}else{
|
||
|
if(args["handle"]){
|
||
|
args.handle=tfw;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}else{
|
||
|
if(dojo.render.html.moz){
|
||
|
if(!this.locationTimer){
|
||
|
this.locationTimer=setInterval("dojo.undo.browser.checkLocation();",200);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}else{
|
||
|
url=this._loadIframeHistory();
|
||
|
}
|
||
|
this.historyStack.push(this._createState(url,args,hash));
|
||
|
},checkLocation:function(){
|
||
|
if(!this.changingUrl){
|
||
|
var hsl=this.historyStack.length;
|
||
|
if((window.location.hash==this.initialHash||window.location.href==this.initialHref)&&(hsl==1)){
|
||
|
this.handleBackButton();
|
||
|
return;
|
||
|
}
|
||
|
if(this.forwardStack.length>0){
|
||
|
if(this.forwardStack[this.forwardStack.length-1].urlHash==window.location.hash){
|
||
|
this.handleForwardButton();
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
if((hsl>=2)&&(this.historyStack[hsl-2])){
|
||
|
if(this.historyStack[hsl-2].urlHash==window.location.hash){
|
||
|
this.handleBackButton();
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},iframeLoaded:function(evt,_267){
|
||
|
if(!dojo.render.html.opera){
|
||
|
var _268=this._getUrlQuery(_267.href);
|
||
|
if(_268==null){
|
||
|
if(this.historyStack.length==1){
|
||
|
this.handleBackButton();
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
if(this.moveForward){
|
||
|
this.moveForward=false;
|
||
|
return;
|
||
|
}
|
||
|
if(this.historyStack.length>=2&&_268==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){
|
||
|
this.handleBackButton();
|
||
|
}else{
|
||
|
if(this.forwardStack.length>0&&_268==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){
|
||
|
this.handleForwardButton();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},handleBackButton:function(){
|
||
|
var _269=this.historyStack.pop();
|
||
|
if(!_269){
|
||
|
return;
|
||
|
}
|
||
|
var last=this.historyStack[this.historyStack.length-1];
|
||
|
if(!last&&this.historyStack.length==0){
|
||
|
last=this.initialState;
|
||
|
}
|
||
|
if(last){
|
||
|
if(last.kwArgs["back"]){
|
||
|
last.kwArgs["back"]();
|
||
|
}else{
|
||
|
if(last.kwArgs["backButton"]){
|
||
|
last.kwArgs["backButton"]();
|
||
|
}else{
|
||
|
if(last.kwArgs["handle"]){
|
||
|
last.kwArgs.handle("back");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
this.forwardStack.push(_269);
|
||
|
},handleForwardButton:function(){
|
||
|
var last=this.forwardStack.pop();
|
||
|
if(!last){
|
||
|
return;
|
||
|
}
|
||
|
if(last.kwArgs["forward"]){
|
||
|
last.kwArgs.forward();
|
||
|
}else{
|
||
|
if(last.kwArgs["forwardButton"]){
|
||
|
last.kwArgs.forwardButton();
|
||
|
}else{
|
||
|
if(last.kwArgs["handle"]){
|
||
|
last.kwArgs.handle("forward");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
this.historyStack.push(last);
|
||
|
},_createState:function(url,args,hash){
|
||
|
return {"url":url,"kwArgs":args,"urlHash":hash};
|
||
|
},_getUrlQuery:function(url){
|
||
|
var _270=url.split("?");
|
||
|
if(_270.length<2){
|
||
|
return null;
|
||
|
}else{
|
||
|
return _270[1];
|
||
|
}
|
||
|
},_loadIframeHistory:function(){
|
||
|
var url=(djConfig["dojoIframeHistoryUrl"]||dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"?"+(new Date()).getTime();
|
||
|
this.moveForward=true;
|
||
|
dojo.io.setIFrameSrc(this.historyIframe,url,false);
|
||
|
return url;
|
||
|
}};
|
||
|
dojo.provide("dojo.io.BrowserIO");
|
||
|
if(!dj_undef("window")){
|
||
|
dojo.io.checkChildrenForFile=function(node){
|
||
|
var _273=false;
|
||
|
var _274=node.getElementsByTagName("input");
|
||
|
dojo.lang.forEach(_274,function(_275){
|
||
|
if(_273){
|
||
|
return;
|
||
|
}
|
||
|
if(_275.getAttribute("type")=="file"){
|
||
|
_273=true;
|
||
|
}
|
||
|
});
|
||
|
return _273;
|
||
|
};
|
||
|
dojo.io.formHasFile=function(_276){
|
||
|
return dojo.io.checkChildrenForFile(_276);
|
||
|
};
|
||
|
dojo.io.updateNode=function(node,_278){
|
||
|
node=dojo.byId(node);
|
||
|
var args=_278;
|
||
|
if(dojo.lang.isString(_278)){
|
||
|
args={url:_278};
|
||
|
}
|
||
|
args.mimetype="text/html";
|
||
|
args.load=function(t,d,e){
|
||
|
while(node.firstChild){
|
||
|
dojo.dom.destroyNode(node.firstChild);
|
||
|
}
|
||
|
node.innerHTML=d;
|
||
|
};
|
||
|
dojo.io.bind(args);
|
||
|
};
|
||
|
dojo.io.formFilter=function(node){
|
||
|
var type=(node.type||"").toLowerCase();
|
||
|
return !node.disabled&&node.name&&!dojo.lang.inArray(["file","submit","image","reset","button"],type);
|
||
|
};
|
||
|
dojo.io.encodeForm=function(_27f,_280,_281){
|
||
|
if((!_27f)||(!_27f.tagName)||(!_27f.tagName.toLowerCase()=="form")){
|
||
|
dojo.raise("Attempted to encode a non-form element.");
|
||
|
}
|
||
|
if(!_281){
|
||
|
_281=dojo.io.formFilter;
|
||
|
}
|
||
|
var enc=/utf/i.test(_280||"")?encodeURIComponent:dojo.string.encodeAscii;
|
||
|
var _283=[];
|
||
|
for(var i=0;i<_27f.elements.length;i++){
|
||
|
var elm=_27f.elements[i];
|
||
|
if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_281(elm)){
|
||
|
continue;
|
||
|
}
|
||
|
var name=enc(elm.name);
|
||
|
var type=elm.type.toLowerCase();
|
||
|
if(type=="select-multiple"){
|
||
|
for(var j=0;j<elm.options.length;j++){
|
||
|
if(elm.options[j].selected){
|
||
|
_283.push(name+"="+enc(elm.options[j].value));
|
||
|
}
|
||
|
}
|
||
|
}else{
|
||
|
if(dojo.lang.inArray(["radio","checkbox"],type)){
|
||
|
if(elm.checked){
|
||
|
_283.push(name+"="+enc(elm.value));
|
||
|
}
|
||
|
}else{
|
||
|
_283.push(name+"="+enc(elm.value));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
var _289=_27f.getElementsByTagName("input");
|
||
|
for(var i=0;i<_289.length;i++){
|
||
|
var _28a=_289[i];
|
||
|
if(_28a.type.toLowerCase()=="image"&&_28a.form==_27f&&_281(_28a)){
|
||
|
var name=enc(_28a.name);
|
||
|
_283.push(name+"="+enc(_28a.value));
|
||
|
_283.push(name+".x=0");
|
||
|
_283.push(name+".y=0");
|
||
|
}
|
||
|
}
|
||
|
return _283.join("&")+"&";
|
||
|
};
|
||
|
dojo.io.FormBind=function(args){
|
||
|
this.bindArgs={};
|
||
|
if(args&&args.formNode){
|
||
|
this.init(args);
|
||
|
}else{
|
||
|
if(args){
|
||
|
this.init({formNode:args});
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.lang.extend(dojo.io.FormBind,{form:null,bindArgs:null,clickedButton:null,init:function(args){
|
||
|
var form=dojo.byId(args.formNode);
|
||
|
if(!form||!form.tagName||form.tagName.toLowerCase()!="form"){
|
||
|
throw new Error("FormBind: Couldn't apply, invalid form");
|
||
|
}else{
|
||
|
if(this.form==form){
|
||
|
return;
|
||
|
}else{
|
||
|
if(this.form){
|
||
|
throw new Error("FormBind: Already applied to a form");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
dojo.lang.mixin(this.bindArgs,args);
|
||
|
this.form=form;
|
||
|
this.connect(form,"onsubmit","submit");
|
||
|
for(var i=0;i<form.elements.length;i++){
|
||
|
var node=form.elements[i];
|
||
|
if(node&&node.type&&dojo.lang.inArray(["submit","button"],node.type.toLowerCase())){
|
||
|
this.connect(node,"onclick","click");
|
||
|
}
|
||
|
}
|
||
|
var _290=form.getElementsByTagName("input");
|
||
|
for(var i=0;i<_290.length;i++){
|
||
|
var _291=_290[i];
|
||
|
if(_291.type.toLowerCase()=="image"&&_291.form==form){
|
||
|
this.connect(_291,"onclick","click");
|
||
|
}
|
||
|
}
|
||
|
},onSubmit:function(form){
|
||
|
return true;
|
||
|
},submit:function(e){
|
||
|
e.preventDefault();
|
||
|
if(this.onSubmit(this.form)){
|
||
|
dojo.io.bind(dojo.lang.mixin(this.bindArgs,{formFilter:dojo.lang.hitch(this,"formFilter")}));
|
||
|
}
|
||
|
},click:function(e){
|
||
|
var node=e.currentTarget;
|
||
|
if(node.disabled){
|
||
|
return;
|
||
|
}
|
||
|
this.clickedButton=node;
|
||
|
},formFilter:function(node){
|
||
|
var type=(node.type||"").toLowerCase();
|
||
|
var _298=false;
|
||
|
if(node.disabled||!node.name){
|
||
|
_298=false;
|
||
|
}else{
|
||
|
if(dojo.lang.inArray(["submit","button","image"],type)){
|
||
|
if(!this.clickedButton){
|
||
|
this.clickedButton=node;
|
||
|
}
|
||
|
_298=node==this.clickedButton;
|
||
|
}else{
|
||
|
_298=!dojo.lang.inArray(["file","submit","reset","button"],type);
|
||
|
}
|
||
|
}
|
||
|
return _298;
|
||
|
},connect:function(_299,_29a,_29b){
|
||
|
if(dojo.evalObjPath("dojo.event.connect")){
|
||
|
dojo.event.connect(_299,_29a,this,_29b);
|
||
|
}else{
|
||
|
var fcn=dojo.lang.hitch(this,_29b);
|
||
|
_299[_29a]=function(e){
|
||
|
if(!e){
|
||
|
e=window.event;
|
||
|
}
|
||
|
if(!e.currentTarget){
|
||
|
e.currentTarget=e.srcElement;
|
||
|
}
|
||
|
if(!e.preventDefault){
|
||
|
e.preventDefault=function(){
|
||
|
window.event.returnValue=false;
|
||
|
};
|
||
|
}
|
||
|
fcn(e);
|
||
|
};
|
||
|
}
|
||
|
}});
|
||
|
dojo.io.XMLHTTPTransport=new function(){
|
||
|
var _29e=this;
|
||
|
var _29f={};
|
||
|
this.useCache=false;
|
||
|
this.preventCache=false;
|
||
|
function getCacheKey(url,_2a1,_2a2){
|
||
|
return url+"|"+_2a1+"|"+_2a2.toLowerCase();
|
||
|
}
|
||
|
function addToCache(url,_2a4,_2a5,http){
|
||
|
_29f[getCacheKey(url,_2a4,_2a5)]=http;
|
||
|
}
|
||
|
function getFromCache(url,_2a8,_2a9){
|
||
|
return _29f[getCacheKey(url,_2a8,_2a9)];
|
||
|
}
|
||
|
this.clearCache=function(){
|
||
|
_29f={};
|
||
|
};
|
||
|
function doLoad(_2aa,http,url,_2ad,_2ae){
|
||
|
if(((http.status>=200)&&(http.status<300))||(http.status==304)||(http.status==1223)||(location.protocol=="file:"&&(http.status==0||http.status==undefined))||(location.protocol=="chrome:"&&(http.status==0||http.status==undefined))){
|
||
|
var ret;
|
||
|
if(_2aa.method.toLowerCase()=="head"){
|
||
|
var _2b0=http.getAllResponseHeaders();
|
||
|
ret={};
|
||
|
ret.toString=function(){
|
||
|
return _2b0;
|
||
|
};
|
||
|
var _2b1=_2b0.split(/[\r\n]+/g);
|
||
|
for(var i=0;i<_2b1.length;i++){
|
||
|
var pair=_2b1[i].match(/^([^:]+)\s*:\s*(.+)$/i);
|
||
|
if(pair){
|
||
|
ret[pair[1]]=pair[2];
|
||
|
}
|
||
|
}
|
||
|
}else{
|
||
|
if(_2aa.mimetype=="text/javascript"){
|
||
|
try{
|
||
|
ret=dj_eval(http.responseText);
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug(e);
|
||
|
dojo.debug(http.responseText);
|
||
|
ret=null;
|
||
|
}
|
||
|
}else{
|
||
|
if(_2aa.mimetype.substr(0,9)=="text/json"||_2aa.mimetype.substr(0,16)=="application/json"){
|
||
|
try{
|
||
|
ret=dj_eval("("+_2aa.jsonFilter(http.responseText)+")");
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug(e);
|
||
|
dojo.debug(http.responseText);
|
||
|
ret=false;
|
||
|
}
|
||
|
}else{
|
||
|
if((_2aa.mimetype=="application/xml")||(_2aa.mimetype=="text/xml")){
|
||
|
ret=http.responseXML;
|
||
|
if(!ret||typeof ret=="string"||!http.getResponseHeader("Content-Type")){
|
||
|
ret=dojo.dom.createDocumentFromText(http.responseText);
|
||
|
}
|
||
|
}else{
|
||
|
ret=http.responseText;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(_2ae){
|
||
|
addToCache(url,_2ad,_2aa.method,http);
|
||
|
}
|
||
|
_2aa[(typeof _2aa.load=="function")?"load":"handle"]("load",ret,http,_2aa);
|
||
|
}else{
|
||
|
var _2b4=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText);
|
||
|
_2aa[(typeof _2aa.error=="function")?"error":"handle"]("error",_2b4,http,_2aa);
|
||
|
}
|
||
|
}
|
||
|
function setHeaders(http,_2b6){
|
||
|
if(_2b6["headers"]){
|
||
|
for(var _2b7 in _2b6["headers"]){
|
||
|
if(_2b7.toLowerCase()=="content-type"&&!_2b6["contentType"]){
|
||
|
_2b6["contentType"]=_2b6["headers"][_2b7];
|
||
|
}else{
|
||
|
http.setRequestHeader(_2b7,_2b6["headers"][_2b7]);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
this.inFlight=[];
|
||
|
this.inFlightTimer=null;
|
||
|
this.startWatchingInFlight=function(){
|
||
|
if(!this.inFlightTimer){
|
||
|
this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10);
|
||
|
}
|
||
|
};
|
||
|
this.watchInFlight=function(){
|
||
|
var now=null;
|
||
|
if(!dojo.hostenv._blockAsync&&!_29e._blockAsync){
|
||
|
for(var x=this.inFlight.length-1;x>=0;x--){
|
||
|
try{
|
||
|
var tif=this.inFlight[x];
|
||
|
if(!tif||tif.http._aborted||!tif.http.readyState){
|
||
|
this.inFlight.splice(x,1);
|
||
|
continue;
|
||
|
}
|
||
|
if(4==tif.http.readyState){
|
||
|
this.inFlight.splice(x,1);
|
||
|
doLoad(tif.req,tif.http,tif.url,tif.query,tif.useCache);
|
||
|
}else{
|
||
|
if(tif.startTime){
|
||
|
if(!now){
|
||
|
now=(new Date()).getTime();
|
||
|
}
|
||
|
if(tif.startTime+(tif.req.timeoutSeconds*1000)<now){
|
||
|
if(typeof tif.http.abort=="function"){
|
||
|
tif.http.abort();
|
||
|
}
|
||
|
this.inFlight.splice(x,1);
|
||
|
tif.req[(typeof tif.req.timeout=="function")?"timeout":"handle"]("timeout",null,tif.http,tif.req);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
try{
|
||
|
var _2bb=new dojo.io.Error("XMLHttpTransport.watchInFlight Error: "+e);
|
||
|
tif.req[(typeof tif.req.error=="function")?"error":"handle"]("error",_2bb,tif.http,tif.req);
|
||
|
}
|
||
|
catch(e2){
|
||
|
dojo.debug("XMLHttpTransport error callback failed: "+e2);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
clearTimeout(this.inFlightTimer);
|
||
|
if(this.inFlight.length==0){
|
||
|
this.inFlightTimer=null;
|
||
|
return;
|
||
|
}
|
||
|
this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10);
|
||
|
};
|
||
|
var _2bc=dojo.hostenv.getXmlhttpObject()?true:false;
|
||
|
this.canHandle=function(_2bd){
|
||
|
var mlc=_2bd["mimetype"].toLowerCase()||"";
|
||
|
return _2bc&&((dojo.lang.inArray(["text/plain","text/html","application/xml","text/xml","text/javascript"],mlc))||(mlc.substr(0,9)=="text/json"||mlc.substr(0,16)=="application/json"))&&!(_2bd["formNode"]&&dojo.io.formHasFile(_2bd["formNode"]));
|
||
|
};
|
||
|
this.multipartBoundary="45309FFF-BD65-4d50-99C9-36986896A96F";
|
||
|
this.bind=function(_2bf){
|
||
|
if(!_2bf["url"]){
|
||
|
if(!_2bf["formNode"]&&(_2bf["backButton"]||_2bf["back"]||_2bf["changeUrl"]||_2bf["watchForURL"])&&(!djConfig.preventBackButtonFix)){
|
||
|
dojo.deprecated("Using dojo.io.XMLHTTPTransport.bind() to add to browser history without doing an IO request","Use dojo.undo.browser.addToHistory() instead.","0.4");
|
||
|
dojo.undo.browser.addToHistory(_2bf);
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
var url=_2bf.url;
|
||
|
var _2c1="";
|
||
|
if(_2bf["formNode"]){
|
||
|
var ta=_2bf.formNode.getAttribute("action");
|
||
|
if((ta)&&(!_2bf["url"])){
|
||
|
url=ta;
|
||
|
}
|
||
|
var tp=_2bf.formNode.getAttribute("method");
|
||
|
if((tp)&&(!_2bf["method"])){
|
||
|
_2bf.method=tp;
|
||
|
}
|
||
|
_2c1+=dojo.io.encodeForm(_2bf.formNode,_2bf.encoding,_2bf["formFilter"]);
|
||
|
}
|
||
|
if(url.indexOf("#")>-1){
|
||
|
dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url);
|
||
|
url=url.split("#")[0];
|
||
|
}
|
||
|
if(_2bf["file"]){
|
||
|
_2bf.method="post";
|
||
|
}
|
||
|
if(!_2bf["method"]){
|
||
|
_2bf.method="get";
|
||
|
}
|
||
|
if(_2bf.method.toLowerCase()=="get"){
|
||
|
_2bf.multipart=false;
|
||
|
}else{
|
||
|
if(_2bf["file"]){
|
||
|
_2bf.multipart=true;
|
||
|
}else{
|
||
|
if(!_2bf["multipart"]){
|
||
|
_2bf.multipart=false;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(_2bf["backButton"]||_2bf["back"]||_2bf["changeUrl"]){
|
||
|
dojo.undo.browser.addToHistory(_2bf);
|
||
|
}
|
||
|
var _2c4=_2bf["content"]||{};
|
||
|
if(_2bf.sendTransport){
|
||
|
_2c4["dojo.transport"]="xmlhttp";
|
||
|
}
|
||
|
do{
|
||
|
if(_2bf.postContent){
|
||
|
_2c1=_2bf.postContent;
|
||
|
break;
|
||
|
}
|
||
|
if(_2c4){
|
||
|
_2c1+=dojo.io.argsFromMap(_2c4,_2bf.encoding);
|
||
|
}
|
||
|
if(_2bf.method.toLowerCase()=="get"||!_2bf.multipart){
|
||
|
break;
|
||
|
}
|
||
|
var t=[];
|
||
|
if(_2c1.length){
|
||
|
var q=_2c1.split("&");
|
||
|
for(var i=0;i<q.length;++i){
|
||
|
if(q[i].length){
|
||
|
var p=q[i].split("=");
|
||
|
t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+p[0]+"\"","",p[1]);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(_2bf.file){
|
||
|
if(dojo.lang.isArray(_2bf.file)){
|
||
|
for(var i=0;i<_2bf.file.length;++i){
|
||
|
var o=_2bf.file[i];
|
||
|
t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+o.name+"\"; filename=\""+("fileName" in o?o.fileName:o.name)+"\"","Content-Type: "+("contentType" in o?o.contentType:"application/octet-stream"),"",o.content);
|
||
|
}
|
||
|
}else{
|
||
|
var o=_2bf.file;
|
||
|
t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+o.name+"\"; filename=\""+("fileName" in o?o.fileName:o.name)+"\"","Content-Type: "+("contentType" in o?o.contentType:"application/octet-stream"),"",o.content);
|
||
|
}
|
||
|
}
|
||
|
if(t.length){
|
||
|
t.push("--"+this.multipartBoundary+"--","");
|
||
|
_2c1=t.join("\r\n");
|
||
|
}
|
||
|
}while(false);
|
||
|
var _2ca=_2bf["sync"]?false:true;
|
||
|
var _2cb=_2bf["preventCache"]||(this.preventCache==true&&_2bf["preventCache"]!=false);
|
||
|
var _2cc=_2bf["useCache"]==true||(this.useCache==true&&_2bf["useCache"]!=false);
|
||
|
if(!_2cb&&_2cc){
|
||
|
var _2cd=getFromCache(url,_2c1,_2bf.method);
|
||
|
if(_2cd){
|
||
|
doLoad(_2bf,_2cd,url,_2c1,false);
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
var http=dojo.hostenv.getXmlhttpObject(_2bf);
|
||
|
var _2cf=false;
|
||
|
if(_2ca){
|
||
|
var _2d0=this.inFlight.push({"req":_2bf,"http":http,"url":url,"query":_2c1,"useCache":_2cc,"startTime":_2bf.timeoutSeconds?(new Date()).getTime():0});
|
||
|
this.startWatchingInFlight();
|
||
|
}else{
|
||
|
_29e._blockAsync=true;
|
||
|
}
|
||
|
if(_2bf.method.toLowerCase()=="post"){
|
||
|
if(!_2bf.user){
|
||
|
http.open("POST",url,_2ca);
|
||
|
}else{
|
||
|
http.open("POST",url,_2ca,_2bf.user,_2bf.password);
|
||
|
}
|
||
|
setHeaders(http,_2bf);
|
||
|
http.setRequestHeader("Content-Type",_2bf.multipart?("multipart/form-data; boundary="+this.multipartBoundary):(_2bf.contentType||"application/x-www-form-urlencoded"));
|
||
|
try{
|
||
|
http.send(_2c1);
|
||
|
}
|
||
|
catch(e){
|
||
|
if(typeof http.abort=="function"){
|
||
|
http.abort();
|
||
|
}
|
||
|
doLoad(_2bf,{status:404},url,_2c1,_2cc);
|
||
|
}
|
||
|
}else{
|
||
|
var _2d1=url;
|
||
|
if(_2c1!=""){
|
||
|
_2d1+=(_2d1.indexOf("?")>-1?"&":"?")+_2c1;
|
||
|
}
|
||
|
if(_2cb){
|
||
|
_2d1+=(dojo.string.endsWithAny(_2d1,"?","&")?"":(_2d1.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf();
|
||
|
}
|
||
|
if(!_2bf.user){
|
||
|
http.open(_2bf.method.toUpperCase(),_2d1,_2ca);
|
||
|
}else{
|
||
|
http.open(_2bf.method.toUpperCase(),_2d1,_2ca,_2bf.user,_2bf.password);
|
||
|
}
|
||
|
setHeaders(http,_2bf);
|
||
|
try{
|
||
|
http.send(null);
|
||
|
}
|
||
|
catch(e){
|
||
|
if(typeof http.abort=="function"){
|
||
|
http.abort();
|
||
|
}
|
||
|
doLoad(_2bf,{status:404},url,_2c1,_2cc);
|
||
|
}
|
||
|
}
|
||
|
if(!_2ca){
|
||
|
doLoad(_2bf,http,url,_2c1,_2cc);
|
||
|
_29e._blockAsync=false;
|
||
|
}
|
||
|
_2bf.abort=function(){
|
||
|
try{
|
||
|
http._aborted=true;
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
return http.abort();
|
||
|
};
|
||
|
return;
|
||
|
};
|
||
|
dojo.io.transports.addTransport("XMLHTTPTransport");
|
||
|
};
|
||
|
}
|
||
|
dojo.provide("dojo.io.cookie");
|
||
|
dojo.io.cookie.setCookie=function(name,_2d3,days,path,_2d6,_2d7){
|
||
|
var _2d8=-1;
|
||
|
if((typeof days=="number")&&(days>=0)){
|
||
|
var d=new Date();
|
||
|
d.setTime(d.getTime()+(days*24*60*60*1000));
|
||
|
_2d8=d.toGMTString();
|
||
|
}
|
||
|
_2d3=escape(_2d3);
|
||
|
document.cookie=name+"="+_2d3+";"+(_2d8!=-1?" expires="+_2d8+";":"")+(path?"path="+path:"")+(_2d6?"; domain="+_2d6:"")+(_2d7?"; secure":"");
|
||
|
};
|
||
|
dojo.io.cookie.set=dojo.io.cookie.setCookie;
|
||
|
dojo.io.cookie.getCookie=function(name){
|
||
|
var idx=document.cookie.lastIndexOf(name+"=");
|
||
|
if(idx==-1){
|
||
|
return null;
|
||
|
}
|
||
|
var _2dc=document.cookie.substring(idx+name.length+1);
|
||
|
var end=_2dc.indexOf(";");
|
||
|
if(end==-1){
|
||
|
end=_2dc.length;
|
||
|
}
|
||
|
_2dc=_2dc.substring(0,end);
|
||
|
_2dc=unescape(_2dc);
|
||
|
return _2dc;
|
||
|
};
|
||
|
dojo.io.cookie.get=dojo.io.cookie.getCookie;
|
||
|
dojo.io.cookie.deleteCookie=function(name){
|
||
|
dojo.io.cookie.setCookie(name,"-",0);
|
||
|
};
|
||
|
dojo.io.cookie.setObjectCookie=function(name,obj,days,path,_2e3,_2e4,_2e5){
|
||
|
if(arguments.length==5){
|
||
|
_2e5=_2e3;
|
||
|
_2e3=null;
|
||
|
_2e4=null;
|
||
|
}
|
||
|
var _2e6=[],_2e7,_2e8="";
|
||
|
if(!_2e5){
|
||
|
_2e7=dojo.io.cookie.getObjectCookie(name);
|
||
|
}
|
||
|
if(days>=0){
|
||
|
if(!_2e7){
|
||
|
_2e7={};
|
||
|
}
|
||
|
for(var prop in obj){
|
||
|
if(obj[prop]==null){
|
||
|
delete _2e7[prop];
|
||
|
}else{
|
||
|
if((typeof obj[prop]=="string")||(typeof obj[prop]=="number")){
|
||
|
_2e7[prop]=obj[prop];
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
prop=null;
|
||
|
for(var prop in _2e7){
|
||
|
_2e6.push(escape(prop)+"="+escape(_2e7[prop]));
|
||
|
}
|
||
|
_2e8=_2e6.join("&");
|
||
|
}
|
||
|
dojo.io.cookie.setCookie(name,_2e8,days,path,_2e3,_2e4);
|
||
|
};
|
||
|
dojo.io.cookie.getObjectCookie=function(name){
|
||
|
var _2eb=null,_2ec=dojo.io.cookie.getCookie(name);
|
||
|
if(_2ec){
|
||
|
_2eb={};
|
||
|
var _2ed=_2ec.split("&");
|
||
|
for(var i=0;i<_2ed.length;i++){
|
||
|
var pair=_2ed[i].split("=");
|
||
|
var _2f0=pair[1];
|
||
|
if(isNaN(_2f0)){
|
||
|
_2f0=unescape(pair[1]);
|
||
|
}
|
||
|
_2eb[unescape(pair[0])]=_2f0;
|
||
|
}
|
||
|
}
|
||
|
return _2eb;
|
||
|
};
|
||
|
dojo.io.cookie.isSupported=function(){
|
||
|
if(typeof navigator.cookieEnabled!="boolean"){
|
||
|
dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null);
|
||
|
var _2f1=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");
|
||
|
navigator.cookieEnabled=(_2f1=="CookiesAllowed");
|
||
|
if(navigator.cookieEnabled){
|
||
|
this.deleteCookie("__TestingYourBrowserForCookieSupport__");
|
||
|
}
|
||
|
}
|
||
|
return navigator.cookieEnabled;
|
||
|
};
|
||
|
if(!dojo.io.cookies){
|
||
|
dojo.io.cookies=dojo.io.cookie;
|
||
|
}
|
||
|
dojo.kwCompoundRequire({common:["dojo.io.common"],rhino:["dojo.io.RhinoIO"],browser:["dojo.io.BrowserIO","dojo.io.cookie"],dashboard:["dojo.io.BrowserIO","dojo.io.cookie"]});
|
||
|
dojo.provide("dojo.io.*");
|
||
|
dojo.provide("dojo.event.common");
|
||
|
dojo.event=new function(){
|
||
|
this._canTimeout=dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]);
|
||
|
function interpolateArgs(args,_2f3){
|
||
|
var dl=dojo.lang;
|
||
|
var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(args.length>2)?args[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false,maxCalls:-1};
|
||
|
switch(args.length){
|
||
|
case 0:
|
||
|
return;
|
||
|
case 1:
|
||
|
return;
|
||
|
case 2:
|
||
|
ao.srcFunc=args[0];
|
||
|
ao.adviceFunc=args[1];
|
||
|
break;
|
||
|
case 3:
|
||
|
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){
|
||
|
ao.adviceType="after";
|
||
|
ao.srcObj=args[0];
|
||
|
ao.srcFunc=args[1];
|
||
|
ao.adviceFunc=args[2];
|
||
|
}else{
|
||
|
if((dl.isString(args[1]))&&(dl.isString(args[2]))){
|
||
|
ao.srcFunc=args[1];
|
||
|
ao.adviceFunc=args[2];
|
||
|
}else{
|
||
|
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){
|
||
|
ao.adviceType="after";
|
||
|
ao.srcObj=args[0];
|
||
|
ao.srcFunc=args[1];
|
||
|
var _2f6=dl.nameAnonFunc(args[2],ao.adviceObj,_2f3);
|
||
|
ao.adviceFunc=_2f6;
|
||
|
}else{
|
||
|
if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){
|
||
|
ao.adviceType="after";
|
||
|
ao.srcObj=dj_global;
|
||
|
var _2f6=dl.nameAnonFunc(args[0],ao.srcObj,_2f3);
|
||
|
ao.srcFunc=_2f6;
|
||
|
ao.adviceObj=args[1];
|
||
|
ao.adviceFunc=args[2];
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
break;
|
||
|
case 4:
|
||
|
if((dl.isObject(args[0]))&&(dl.isObject(args[2]))){
|
||
|
ao.adviceType="after";
|
||
|
ao.srcObj=args[0];
|
||
|
ao.srcFunc=args[1];
|
||
|
ao.adviceObj=args[2];
|
||
|
ao.adviceFunc=args[3];
|
||
|
}else{
|
||
|
if((dl.isString(args[0]))&&(dl.isString(args[1]))&&(dl.isObject(args[2]))){
|
||
|
ao.adviceType=args[0];
|
||
|
ao.srcObj=dj_global;
|
||
|
ao.srcFunc=args[1];
|
||
|
ao.adviceObj=args[2];
|
||
|
ao.adviceFunc=args[3];
|
||
|
}else{
|
||
|
if((dl.isString(args[0]))&&(dl.isFunction(args[1]))&&(dl.isObject(args[2]))){
|
||
|
ao.adviceType=args[0];
|
||
|
ao.srcObj=dj_global;
|
||
|
var _2f6=dl.nameAnonFunc(args[1],dj_global,_2f3);
|
||
|
ao.srcFunc=_2f6;
|
||
|
ao.adviceObj=args[2];
|
||
|
ao.adviceFunc=args[3];
|
||
|
}else{
|
||
|
if((dl.isString(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))&&(dl.isFunction(args[3]))){
|
||
|
ao.srcObj=args[1];
|
||
|
ao.srcFunc=args[2];
|
||
|
var _2f6=dl.nameAnonFunc(args[3],dj_global,_2f3);
|
||
|
ao.adviceObj=dj_global;
|
||
|
ao.adviceFunc=_2f6;
|
||
|
}else{
|
||
|
if(dl.isObject(args[1])){
|
||
|
ao.srcObj=args[1];
|
||
|
ao.srcFunc=args[2];
|
||
|
ao.adviceObj=dj_global;
|
||
|
ao.adviceFunc=args[3];
|
||
|
}else{
|
||
|
if(dl.isObject(args[2])){
|
||
|
ao.srcObj=dj_global;
|
||
|
ao.srcFunc=args[1];
|
||
|
ao.adviceObj=args[2];
|
||
|
ao.adviceFunc=args[3];
|
||
|
}else{
|
||
|
ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global;
|
||
|
ao.srcFunc=args[1];
|
||
|
ao.adviceFunc=args[2];
|
||
|
ao.aroundFunc=args[3];
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
break;
|
||
|
case 6:
|
||
|
ao.srcObj=args[1];
|
||
|
ao.srcFunc=args[2];
|
||
|
ao.adviceObj=args[3];
|
||
|
ao.adviceFunc=args[4];
|
||
|
ao.aroundFunc=args[5];
|
||
|
ao.aroundObj=dj_global;
|
||
|
break;
|
||
|
default:
|
||
|
ao.srcObj=args[1];
|
||
|
ao.srcFunc=args[2];
|
||
|
ao.adviceObj=args[3];
|
||
|
ao.adviceFunc=args[4];
|
||
|
ao.aroundObj=args[5];
|
||
|
ao.aroundFunc=args[6];
|
||
|
ao.once=args[7];
|
||
|
ao.delay=args[8];
|
||
|
ao.rate=args[9];
|
||
|
ao.adviceMsg=args[10];
|
||
|
ao.maxCalls=(!isNaN(parseInt(args[11])))?args[11]:-1;
|
||
|
break;
|
||
|
}
|
||
|
if(dl.isFunction(ao.aroundFunc)){
|
||
|
var _2f6=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_2f3);
|
||
|
ao.aroundFunc=_2f6;
|
||
|
}
|
||
|
if(dl.isFunction(ao.srcFunc)){
|
||
|
ao.srcFunc=dl.getNameInObj(ao.srcObj,ao.srcFunc);
|
||
|
}
|
||
|
if(dl.isFunction(ao.adviceFunc)){
|
||
|
ao.adviceFunc=dl.getNameInObj(ao.adviceObj,ao.adviceFunc);
|
||
|
}
|
||
|
if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){
|
||
|
ao.aroundFunc=dl.getNameInObj(ao.aroundObj,ao.aroundFunc);
|
||
|
}
|
||
|
if(!ao.srcObj){
|
||
|
dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc);
|
||
|
}
|
||
|
if(!ao.adviceObj){
|
||
|
dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc);
|
||
|
}
|
||
|
if(!ao.adviceFunc){
|
||
|
dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc);
|
||
|
dojo.debugShallow(ao);
|
||
|
}
|
||
|
return ao;
|
||
|
}
|
||
|
this.connect=function(){
|
||
|
if(arguments.length==1){
|
||
|
var ao=arguments[0];
|
||
|
}else{
|
||
|
var ao=interpolateArgs(arguments,true);
|
||
|
}
|
||
|
if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){
|
||
|
if(dojo.render.html.ie){
|
||
|
ao.srcFunc="onkeydown";
|
||
|
this.connect(ao);
|
||
|
}
|
||
|
ao.srcFunc="onkeypress";
|
||
|
}
|
||
|
if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!=""){
|
||
|
var _2f8={};
|
||
|
for(var x in ao){
|
||
|
_2f8[x]=ao[x];
|
||
|
}
|
||
|
var mjps=[];
|
||
|
dojo.lang.forEach(ao.srcObj,function(src){
|
||
|
if((dojo.render.html.capable)&&(dojo.lang.isString(src))){
|
||
|
src=dojo.byId(src);
|
||
|
}
|
||
|
_2f8.srcObj=src;
|
||
|
mjps.push(dojo.event.connect.call(dojo.event,_2f8));
|
||
|
});
|
||
|
return mjps;
|
||
|
}
|
||
|
var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc);
|
||
|
if(ao.adviceFunc){
|
||
|
var mjp2=dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj,ao.adviceFunc);
|
||
|
}
|
||
|
mjp.kwAddAdvice(ao);
|
||
|
return mjp;
|
||
|
};
|
||
|
this.log=function(a1,a2){
|
||
|
var _300;
|
||
|
if((arguments.length==1)&&(typeof a1=="object")){
|
||
|
_300=a1;
|
||
|
}else{
|
||
|
_300={srcObj:a1,srcFunc:a2};
|
||
|
}
|
||
|
_300.adviceFunc=function(){
|
||
|
var _301=[];
|
||
|
for(var x=0;x<arguments.length;x++){
|
||
|
_301.push(arguments[x]);
|
||
|
}
|
||
|
dojo.debug("("+_300.srcObj+")."+_300.srcFunc,":",_301.join(", "));
|
||
|
};
|
||
|
this.kwConnect(_300);
|
||
|
};
|
||
|
this.connectBefore=function(){
|
||
|
var args=["before"];
|
||
|
for(var i=0;i<arguments.length;i++){
|
||
|
args.push(arguments[i]);
|
||
|
}
|
||
|
return this.connect.apply(this,args);
|
||
|
};
|
||
|
this.connectAround=function(){
|
||
|
var args=["around"];
|
||
|
for(var i=0;i<arguments.length;i++){
|
||
|
args.push(arguments[i]);
|
||
|
}
|
||
|
return this.connect.apply(this,args);
|
||
|
};
|
||
|
this.connectOnce=function(){
|
||
|
var ao=interpolateArgs(arguments,true);
|
||
|
ao.once=true;
|
||
|
return this.connect(ao);
|
||
|
};
|
||
|
this.connectRunOnce=function(){
|
||
|
var ao=interpolateArgs(arguments,true);
|
||
|
ao.maxCalls=1;
|
||
|
return this.connect(ao);
|
||
|
};
|
||
|
this._kwConnectImpl=function(_309,_30a){
|
||
|
var fn=(_30a)?"disconnect":"connect";
|
||
|
if(typeof _309["srcFunc"]=="function"){
|
||
|
_309.srcObj=_309["srcObj"]||dj_global;
|
||
|
var _30c=dojo.lang.nameAnonFunc(_309.srcFunc,_309.srcObj,true);
|
||
|
_309.srcFunc=_30c;
|
||
|
}
|
||
|
if(typeof _309["adviceFunc"]=="function"){
|
||
|
_309.adviceObj=_309["adviceObj"]||dj_global;
|
||
|
var _30c=dojo.lang.nameAnonFunc(_309.adviceFunc,_309.adviceObj,true);
|
||
|
_309.adviceFunc=_30c;
|
||
|
}
|
||
|
_309.srcObj=_309["srcObj"]||dj_global;
|
||
|
_309.adviceObj=_309["adviceObj"]||_309["targetObj"]||dj_global;
|
||
|
_309.adviceFunc=_309["adviceFunc"]||_309["targetFunc"];
|
||
|
return dojo.event[fn](_309);
|
||
|
};
|
||
|
this.kwConnect=function(_30d){
|
||
|
return this._kwConnectImpl(_30d,false);
|
||
|
};
|
||
|
this.disconnect=function(){
|
||
|
if(arguments.length==1){
|
||
|
var ao=arguments[0];
|
||
|
}else{
|
||
|
var ao=interpolateArgs(arguments,true);
|
||
|
}
|
||
|
if(!ao.adviceFunc){
|
||
|
return;
|
||
|
}
|
||
|
if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){
|
||
|
if(dojo.render.html.ie){
|
||
|
ao.srcFunc="onkeydown";
|
||
|
this.disconnect(ao);
|
||
|
}
|
||
|
ao.srcFunc="onkeypress";
|
||
|
}
|
||
|
if(!ao.srcObj[ao.srcFunc]){
|
||
|
return null;
|
||
|
}
|
||
|
var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc,true);
|
||
|
mjp.removeAdvice(ao.adviceObj,ao.adviceFunc,ao.adviceType,ao.once);
|
||
|
return mjp;
|
||
|
};
|
||
|
this.kwDisconnect=function(_310){
|
||
|
return this._kwConnectImpl(_310,true);
|
||
|
};
|
||
|
};
|
||
|
dojo.event.MethodInvocation=function(_311,obj,args){
|
||
|
this.jp_=_311;
|
||
|
this.object=obj;
|
||
|
this.args=[];
|
||
|
for(var x=0;x<args.length;x++){
|
||
|
this.args[x]=args[x];
|
||
|
}
|
||
|
this.around_index=-1;
|
||
|
};
|
||
|
dojo.event.MethodInvocation.prototype.proceed=function(){
|
||
|
this.around_index++;
|
||
|
if(this.around_index>=this.jp_.around.length){
|
||
|
return this.jp_.object[this.jp_.methodname].apply(this.jp_.object,this.args);
|
||
|
}else{
|
||
|
var ti=this.jp_.around[this.around_index];
|
||
|
var mobj=ti[0]||dj_global;
|
||
|
var meth=ti[1];
|
||
|
return mobj[meth].call(mobj,this);
|
||
|
}
|
||
|
};
|
||
|
dojo.event.MethodJoinPoint=function(obj,_319){
|
||
|
this.object=obj||dj_global;
|
||
|
this.methodname=_319;
|
||
|
this.methodfunc=this.object[_319];
|
||
|
this.squelch=false;
|
||
|
};
|
||
|
dojo.event.MethodJoinPoint.getForMethod=function(obj,_31b){
|
||
|
if(!obj){
|
||
|
obj=dj_global;
|
||
|
}
|
||
|
var ofn=obj[_31b];
|
||
|
if(!ofn){
|
||
|
ofn=obj[_31b]=function(){
|
||
|
};
|
||
|
if(!obj[_31b]){
|
||
|
dojo.raise("Cannot set do-nothing method on that object "+_31b);
|
||
|
}
|
||
|
}else{
|
||
|
if((typeof ofn!="function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){
|
||
|
return null;
|
||
|
}
|
||
|
}
|
||
|
var _31d=_31b+"$joinpoint";
|
||
|
var _31e=_31b+"$joinpoint$method";
|
||
|
var _31f=obj[_31d];
|
||
|
if(!_31f){
|
||
|
var _320=false;
|
||
|
if(dojo.event["browser"]){
|
||
|
if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){
|
||
|
_320=true;
|
||
|
dojo.event.browser.addClobberNodeAttrs(obj,[_31d,_31e,_31b]);
|
||
|
}
|
||
|
}
|
||
|
var _321=ofn.length;
|
||
|
obj[_31e]=ofn;
|
||
|
_31f=obj[_31d]=new dojo.event.MethodJoinPoint(obj,_31e);
|
||
|
if(!_320){
|
||
|
obj[_31b]=function(){
|
||
|
return _31f.run.apply(_31f,arguments);
|
||
|
};
|
||
|
}else{
|
||
|
obj[_31b]=function(){
|
||
|
var args=[];
|
||
|
if(!arguments.length){
|
||
|
var evt=null;
|
||
|
try{
|
||
|
if(obj.ownerDocument){
|
||
|
evt=obj.ownerDocument.parentWindow.event;
|
||
|
}else{
|
||
|
if(obj.documentElement){
|
||
|
evt=obj.documentElement.ownerDocument.parentWindow.event;
|
||
|
}else{
|
||
|
if(obj.event){
|
||
|
evt=obj.event;
|
||
|
}else{
|
||
|
evt=window.event;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
evt=window.event;
|
||
|
}
|
||
|
if(evt){
|
||
|
args.push(dojo.event.browser.fixEvent(evt,this));
|
||
|
}
|
||
|
}else{
|
||
|
for(var x=0;x<arguments.length;x++){
|
||
|
if((x==0)&&(dojo.event.browser.isEvent(arguments[x]))){
|
||
|
args.push(dojo.event.browser.fixEvent(arguments[x],this));
|
||
|
}else{
|
||
|
args.push(arguments[x]);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return _31f.run.apply(_31f,args);
|
||
|
};
|
||
|
}
|
||
|
obj[_31b].__preJoinArity=_321;
|
||
|
}
|
||
|
return _31f;
|
||
|
};
|
||
|
dojo.lang.extend(dojo.event.MethodJoinPoint,{squelch:false,unintercept:function(){
|
||
|
this.object[this.methodname]=this.methodfunc;
|
||
|
this.before=[];
|
||
|
this.after=[];
|
||
|
this.around=[];
|
||
|
},disconnect:dojo.lang.forward("unintercept"),run:function(){
|
||
|
var obj=this.object||dj_global;
|
||
|
var args=arguments;
|
||
|
var _327=[];
|
||
|
for(var x=0;x<args.length;x++){
|
||
|
_327[x]=args[x];
|
||
|
}
|
||
|
var _329=function(marr){
|
||
|
if(!marr){
|
||
|
dojo.debug("Null argument to unrollAdvice()");
|
||
|
return;
|
||
|
}
|
||
|
var _32b=marr[0]||dj_global;
|
||
|
var _32c=marr[1];
|
||
|
if(!_32b[_32c]){
|
||
|
dojo.raise("function \""+_32c+"\" does not exist on \""+_32b+"\"");
|
||
|
}
|
||
|
var _32d=marr[2]||dj_global;
|
||
|
var _32e=marr[3];
|
||
|
var msg=marr[6];
|
||
|
var _330=marr[7];
|
||
|
if(_330>-1){
|
||
|
if(_330==0){
|
||
|
return;
|
||
|
}
|
||
|
marr[7]--;
|
||
|
}
|
||
|
var _331;
|
||
|
var to={args:[],jp_:this,object:obj,proceed:function(){
|
||
|
return _32b[_32c].apply(_32b,to.args);
|
||
|
}};
|
||
|
to.args=_327;
|
||
|
var _333=parseInt(marr[4]);
|
||
|
var _334=((!isNaN(_333))&&(marr[4]!==null)&&(typeof marr[4]!="undefined"));
|
||
|
if(marr[5]){
|
||
|
var rate=parseInt(marr[5]);
|
||
|
var cur=new Date();
|
||
|
var _337=false;
|
||
|
if((marr["last"])&&((cur-marr.last)<=rate)){
|
||
|
if(dojo.event._canTimeout){
|
||
|
if(marr["delayTimer"]){
|
||
|
clearTimeout(marr.delayTimer);
|
||
|
}
|
||
|
var tod=parseInt(rate*2);
|
||
|
var mcpy=dojo.lang.shallowCopy(marr);
|
||
|
marr.delayTimer=setTimeout(function(){
|
||
|
mcpy[5]=0;
|
||
|
_329(mcpy);
|
||
|
},tod);
|
||
|
}
|
||
|
return;
|
||
|
}else{
|
||
|
marr.last=cur;
|
||
|
}
|
||
|
}
|
||
|
if(_32e){
|
||
|
_32d[_32e].call(_32d,to);
|
||
|
}else{
|
||
|
if((_334)&&((dojo.render.html)||(dojo.render.svg))){
|
||
|
dj_global["setTimeout"](function(){
|
||
|
if(msg){
|
||
|
_32b[_32c].call(_32b,to);
|
||
|
}else{
|
||
|
_32b[_32c].apply(_32b,args);
|
||
|
}
|
||
|
},_333);
|
||
|
}else{
|
||
|
if(msg){
|
||
|
_32b[_32c].call(_32b,to);
|
||
|
}else{
|
||
|
_32b[_32c].apply(_32b,args);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
var _33a=function(){
|
||
|
if(this.squelch){
|
||
|
try{
|
||
|
return _329.apply(this,arguments);
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug(e);
|
||
|
}
|
||
|
}else{
|
||
|
return _329.apply(this,arguments);
|
||
|
}
|
||
|
};
|
||
|
if((this["before"])&&(this.before.length>0)){
|
||
|
dojo.lang.forEach(this.before.concat(new Array()),_33a);
|
||
|
}
|
||
|
var _33b;
|
||
|
try{
|
||
|
if((this["around"])&&(this.around.length>0)){
|
||
|
var mi=new dojo.event.MethodInvocation(this,obj,args);
|
||
|
_33b=mi.proceed();
|
||
|
}else{
|
||
|
if(this.methodfunc){
|
||
|
_33b=this.object[this.methodname].apply(this.object,args);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
if(!this.squelch){
|
||
|
dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",args);
|
||
|
dojo.raise(e);
|
||
|
}
|
||
|
}
|
||
|
if((this["after"])&&(this.after.length>0)){
|
||
|
dojo.lang.forEach(this.after.concat(new Array()),_33a);
|
||
|
}
|
||
|
return (this.methodfunc)?_33b:null;
|
||
|
},getArr:function(kind){
|
||
|
var type="after";
|
||
|
if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){
|
||
|
type="before";
|
||
|
}else{
|
||
|
if(kind=="around"){
|
||
|
type="around";
|
||
|
}
|
||
|
}
|
||
|
if(!this[type]){
|
||
|
this[type]=[];
|
||
|
}
|
||
|
return this[type];
|
||
|
},kwAddAdvice:function(args){
|
||
|
this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"],args["maxCalls"]);
|
||
|
},addAdvice:function(_340,_341,_342,_343,_344,_345,once,_347,rate,_349,_34a){
|
||
|
var arr=this.getArr(_344);
|
||
|
if(!arr){
|
||
|
dojo.raise("bad this: "+this);
|
||
|
}
|
||
|
var ao=[_340,_341,_342,_343,_347,rate,_349,_34a];
|
||
|
if(once){
|
||
|
if(this.hasAdvice(_340,_341,_344,arr)>=0){
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
if(_345=="first"){
|
||
|
arr.unshift(ao);
|
||
|
}else{
|
||
|
arr.push(ao);
|
||
|
}
|
||
|
},hasAdvice:function(_34d,_34e,_34f,arr){
|
||
|
if(!arr){
|
||
|
arr=this.getArr(_34f);
|
||
|
}
|
||
|
var ind=-1;
|
||
|
for(var x=0;x<arr.length;x++){
|
||
|
var aao=(typeof _34e=="object")?(new String(_34e)).toString():_34e;
|
||
|
var a1o=(typeof arr[x][1]=="object")?(new String(arr[x][1])).toString():arr[x][1];
|
||
|
if((arr[x][0]==_34d)&&(a1o==aao)){
|
||
|
ind=x;
|
||
|
}
|
||
|
}
|
||
|
return ind;
|
||
|
},removeAdvice:function(_355,_356,_357,once){
|
||
|
var arr=this.getArr(_357);
|
||
|
var ind=this.hasAdvice(_355,_356,_357,arr);
|
||
|
if(ind==-1){
|
||
|
return false;
|
||
|
}
|
||
|
while(ind!=-1){
|
||
|
arr.splice(ind,1);
|
||
|
if(once){
|
||
|
break;
|
||
|
}
|
||
|
ind=this.hasAdvice(_355,_356,_357,arr);
|
||
|
}
|
||
|
return true;
|
||
|
}});
|
||
|
dojo.provide("dojo.event.topic");
|
||
|
dojo.event.topic=new function(){
|
||
|
this.topics={};
|
||
|
this.getTopic=function(_35b){
|
||
|
if(!this.topics[_35b]){
|
||
|
this.topics[_35b]=new this.TopicImpl(_35b);
|
||
|
}
|
||
|
return this.topics[_35b];
|
||
|
};
|
||
|
this.registerPublisher=function(_35c,obj,_35e){
|
||
|
var _35c=this.getTopic(_35c);
|
||
|
_35c.registerPublisher(obj,_35e);
|
||
|
};
|
||
|
this.subscribe=function(_35f,obj,_361){
|
||
|
var _35f=this.getTopic(_35f);
|
||
|
_35f.subscribe(obj,_361);
|
||
|
};
|
||
|
this.unsubscribe=function(_362,obj,_364){
|
||
|
var _362=this.getTopic(_362);
|
||
|
_362.unsubscribe(obj,_364);
|
||
|
};
|
||
|
this.destroy=function(_365){
|
||
|
this.getTopic(_365).destroy();
|
||
|
delete this.topics[_365];
|
||
|
};
|
||
|
this.publishApply=function(_366,args){
|
||
|
var _366=this.getTopic(_366);
|
||
|
_366.sendMessage.apply(_366,args);
|
||
|
};
|
||
|
this.publish=function(_368,_369){
|
||
|
var _368=this.getTopic(_368);
|
||
|
var args=[];
|
||
|
for(var x=1;x<arguments.length;x++){
|
||
|
args.push(arguments[x]);
|
||
|
}
|
||
|
_368.sendMessage.apply(_368,args);
|
||
|
};
|
||
|
};
|
||
|
dojo.event.topic.TopicImpl=function(_36c){
|
||
|
this.topicName=_36c;
|
||
|
this.subscribe=function(_36d,_36e){
|
||
|
var tf=_36e||_36d;
|
||
|
var to=(!_36e)?dj_global:_36d;
|
||
|
return dojo.event.kwConnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
|
||
|
};
|
||
|
this.unsubscribe=function(_371,_372){
|
||
|
var tf=(!_372)?_371:_372;
|
||
|
var to=(!_372)?null:_371;
|
||
|
return dojo.event.kwDisconnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
|
||
|
};
|
||
|
this._getJoinPoint=function(){
|
||
|
return dojo.event.MethodJoinPoint.getForMethod(this,"sendMessage");
|
||
|
};
|
||
|
this.setSquelch=function(_375){
|
||
|
this._getJoinPoint().squelch=_375;
|
||
|
};
|
||
|
this.destroy=function(){
|
||
|
this._getJoinPoint().disconnect();
|
||
|
};
|
||
|
this.registerPublisher=function(_376,_377){
|
||
|
dojo.event.connect(_376,_377,this,"sendMessage");
|
||
|
};
|
||
|
this.sendMessage=function(_378){
|
||
|
};
|
||
|
};
|
||
|
dojo.provide("dojo.event.browser");
|
||
|
dojo._ie_clobber=new function(){
|
||
|
this.clobberNodes=[];
|
||
|
function nukeProp(node,prop){
|
||
|
try{
|
||
|
node[prop]=null;
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
try{
|
||
|
delete node[prop];
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
try{
|
||
|
node.removeAttribute(prop);
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
}
|
||
|
this.clobber=function(_37b){
|
||
|
var na;
|
||
|
var tna;
|
||
|
if(_37b){
|
||
|
tna=_37b.all||_37b.getElementsByTagName("*");
|
||
|
na=[_37b];
|
||
|
for(var x=0;x<tna.length;x++){
|
||
|
if(tna[x]["__doClobber__"]){
|
||
|
na.push(tna[x]);
|
||
|
}
|
||
|
}
|
||
|
}else{
|
||
|
try{
|
||
|
window.onload=null;
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
na=(this.clobberNodes.length)?this.clobberNodes:document.all;
|
||
|
}
|
||
|
tna=null;
|
||
|
var _37f={};
|
||
|
for(var i=na.length-1;i>=0;i=i-1){
|
||
|
var el=na[i];
|
||
|
try{
|
||
|
if(el&&el["__clobberAttrs__"]){
|
||
|
for(var j=0;j<el.__clobberAttrs__.length;j++){
|
||
|
nukeProp(el,el.__clobberAttrs__[j]);
|
||
|
}
|
||
|
nukeProp(el,"__clobberAttrs__");
|
||
|
nukeProp(el,"__doClobber__");
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
}
|
||
|
na=null;
|
||
|
};
|
||
|
};
|
||
|
if(dojo.render.html.ie){
|
||
|
dojo.addOnUnload(function(){
|
||
|
dojo._ie_clobber.clobber();
|
||
|
try{
|
||
|
if((dojo["widget"])&&(dojo.widget["manager"])){
|
||
|
dojo.widget.manager.destroyAll();
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
if(dojo.widget){
|
||
|
for(var name in dojo.widget._templateCache){
|
||
|
if(dojo.widget._templateCache[name].node){
|
||
|
dojo.dom.destroyNode(dojo.widget._templateCache[name].node);
|
||
|
dojo.widget._templateCache[name].node=null;
|
||
|
delete dojo.widget._templateCache[name].node;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
try{
|
||
|
window.onload=null;
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
try{
|
||
|
window.onunload=null;
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
dojo._ie_clobber.clobberNodes=[];
|
||
|
});
|
||
|
}
|
||
|
dojo.event.browser=new function(){
|
||
|
var _384=0;
|
||
|
this.normalizedEventName=function(_385){
|
||
|
switch(_385){
|
||
|
case "CheckboxStateChange":
|
||
|
case "DOMAttrModified":
|
||
|
case "DOMMenuItemActive":
|
||
|
case "DOMMenuItemInactive":
|
||
|
case "DOMMouseScroll":
|
||
|
case "DOMNodeInserted":
|
||
|
case "DOMNodeRemoved":
|
||
|
case "RadioStateChange":
|
||
|
return _385;
|
||
|
break;
|
||
|
default:
|
||
|
var lcn=_385.toLowerCase();
|
||
|
return (lcn.indexOf("on")==0)?lcn.substr(2):lcn;
|
||
|
break;
|
||
|
}
|
||
|
};
|
||
|
this.clean=function(node){
|
||
|
if(dojo.render.html.ie){
|
||
|
dojo._ie_clobber.clobber(node);
|
||
|
}
|
||
|
};
|
||
|
this.addClobberNode=function(node){
|
||
|
if(!dojo.render.html.ie){
|
||
|
return;
|
||
|
}
|
||
|
if(!node["__doClobber__"]){
|
||
|
node.__doClobber__=true;
|
||
|
dojo._ie_clobber.clobberNodes.push(node);
|
||
|
node.__clobberAttrs__=[];
|
||
|
}
|
||
|
};
|
||
|
this.addClobberNodeAttrs=function(node,_38a){
|
||
|
if(!dojo.render.html.ie){
|
||
|
return;
|
||
|
}
|
||
|
this.addClobberNode(node);
|
||
|
for(var x=0;x<_38a.length;x++){
|
||
|
node.__clobberAttrs__.push(_38a[x]);
|
||
|
}
|
||
|
};
|
||
|
this.removeListener=function(node,_38d,fp,_38f){
|
||
|
if(!_38f){
|
||
|
var _38f=false;
|
||
|
}
|
||
|
_38d=dojo.event.browser.normalizedEventName(_38d);
|
||
|
if(_38d=="key"){
|
||
|
if(dojo.render.html.ie){
|
||
|
this.removeListener(node,"onkeydown",fp,_38f);
|
||
|
}
|
||
|
_38d="keypress";
|
||
|
}
|
||
|
if(node.removeEventListener){
|
||
|
node.removeEventListener(_38d,fp,_38f);
|
||
|
}
|
||
|
};
|
||
|
this.addListener=function(node,_391,fp,_393,_394){
|
||
|
if(!node){
|
||
|
return;
|
||
|
}
|
||
|
if(!_393){
|
||
|
var _393=false;
|
||
|
}
|
||
|
_391=dojo.event.browser.normalizedEventName(_391);
|
||
|
if(_391=="key"){
|
||
|
if(dojo.render.html.ie){
|
||
|
this.addListener(node,"onkeydown",fp,_393,_394);
|
||
|
}
|
||
|
_391="keypress";
|
||
|
}
|
||
|
if(!_394){
|
||
|
var _395=function(evt){
|
||
|
if(!evt){
|
||
|
evt=window.event;
|
||
|
}
|
||
|
var ret=fp(dojo.event.browser.fixEvent(evt,this));
|
||
|
if(_393){
|
||
|
dojo.event.browser.stopEvent(evt);
|
||
|
}
|
||
|
return ret;
|
||
|
};
|
||
|
}else{
|
||
|
_395=fp;
|
||
|
}
|
||
|
if(node.addEventListener){
|
||
|
node.addEventListener(_391,_395,_393);
|
||
|
return _395;
|
||
|
}else{
|
||
|
_391="on"+_391;
|
||
|
if(typeof node[_391]=="function"){
|
||
|
var _398=node[_391];
|
||
|
node[_391]=function(e){
|
||
|
_398(e);
|
||
|
return _395(e);
|
||
|
};
|
||
|
}else{
|
||
|
node[_391]=_395;
|
||
|
}
|
||
|
if(dojo.render.html.ie){
|
||
|
this.addClobberNodeAttrs(node,[_391]);
|
||
|
}
|
||
|
return _395;
|
||
|
}
|
||
|
};
|
||
|
this.isEvent=function(obj){
|
||
|
return (typeof obj!="undefined")&&(obj)&&(typeof Event!="undefined")&&(obj.eventPhase);
|
||
|
};
|
||
|
this.currentEvent=null;
|
||
|
this.callListener=function(_39b,_39c){
|
||
|
if(typeof _39b!="function"){
|
||
|
dojo.raise("listener not a function: "+_39b);
|
||
|
}
|
||
|
dojo.event.browser.currentEvent.currentTarget=_39c;
|
||
|
return _39b.call(_39c,dojo.event.browser.currentEvent);
|
||
|
};
|
||
|
this._stopPropagation=function(){
|
||
|
dojo.event.browser.currentEvent.cancelBubble=true;
|
||
|
};
|
||
|
this._preventDefault=function(){
|
||
|
dojo.event.browser.currentEvent.returnValue=false;
|
||
|
};
|
||
|
this.keys={KEY_BACKSPACE:8,KEY_TAB:9,KEY_CLEAR:12,KEY_ENTER:13,KEY_SHIFT:16,KEY_CTRL:17,KEY_ALT:18,KEY_PAUSE:19,KEY_CAPS_LOCK:20,KEY_ESCAPE:27,KEY_SPACE:32,KEY_PAGE_UP:33,KEY_PAGE_DOWN:34,KEY_END:35,KEY_HOME:36,KEY_LEFT_ARROW:37,KEY_UP_ARROW:38,KEY_RIGHT_ARROW:39,KEY_DOWN_ARROW:40,KEY_INSERT:45,KEY_DELETE:46,KEY_HELP:47,KEY_LEFT_WINDOW:91,KEY_RIGHT_WINDOW:92,KEY_SELECT:93,KEY_NUMPAD_0:96,KEY_NUMPAD_1:97,KEY_NUMPAD_2:98,KEY_NUMPAD_3:99,KEY_NUMPAD_4:100,KEY_NUMPAD_5:101,KEY_NUMPAD_6:102,KEY_NUMPAD_7:103,KEY_NUMPAD_8:104,KEY_NUMPAD_9:105,KEY_NUMPAD_MULTIPLY:106,KEY_NUMPAD_PLUS:107,KEY_NUMPAD_ENTER:108,KEY_NUMPAD_MINUS:109,KEY_NUMPAD_PERIOD:110,KEY_NUMPAD_DIVIDE:111,KEY_F1:112,KEY_F2:113,KEY_F3:114,KEY_F4:115,KEY_F5:116,KEY_F6:117,KEY_F7:118,KEY_F8:119,KEY_F9:120,KEY_F10:121,KEY_F11:122,KEY_F12:123,KEY_F13:124,KEY_F14:125,KEY_F15:126,KEY_NUM_LOCK:144,KEY_SCROLL_LOCK:145};
|
||
|
this.revKeys=[];
|
||
|
for(var key in this.keys){
|
||
|
this.revKeys[this.keys[key]]=key;
|
||
|
}
|
||
|
this.fixEvent=function(evt,_39f){
|
||
|
if(!evt){
|
||
|
if(window["event"]){
|
||
|
evt=window.event;
|
||
|
}
|
||
|
}
|
||
|
if((evt["type"])&&(evt["type"].indexOf("key")==0)){
|
||
|
evt.keys=this.revKeys;
|
||
|
for(var key in this.keys){
|
||
|
evt[key]=this.keys[key];
|
||
|
}
|
||
|
if(evt["type"]=="keydown"&&dojo.render.html.ie){
|
||
|
switch(evt.keyCode){
|
||
|
case evt.KEY_SHIFT:
|
||
|
case evt.KEY_CTRL:
|
||
|
case evt.KEY_ALT:
|
||
|
case evt.KEY_CAPS_LOCK:
|
||
|
case evt.KEY_LEFT_WINDOW:
|
||
|
case evt.KEY_RIGHT_WINDOW:
|
||
|
case evt.KEY_SELECT:
|
||
|
case evt.KEY_NUM_LOCK:
|
||
|
case evt.KEY_SCROLL_LOCK:
|
||
|
case evt.KEY_NUMPAD_0:
|
||
|
case evt.KEY_NUMPAD_1:
|
||
|
case evt.KEY_NUMPAD_2:
|
||
|
case evt.KEY_NUMPAD_3:
|
||
|
case evt.KEY_NUMPAD_4:
|
||
|
case evt.KEY_NUMPAD_5:
|
||
|
case evt.KEY_NUMPAD_6:
|
||
|
case evt.KEY_NUMPAD_7:
|
||
|
case evt.KEY_NUMPAD_8:
|
||
|
case evt.KEY_NUMPAD_9:
|
||
|
case evt.KEY_NUMPAD_PERIOD:
|
||
|
break;
|
||
|
case evt.KEY_NUMPAD_MULTIPLY:
|
||
|
case evt.KEY_NUMPAD_PLUS:
|
||
|
case evt.KEY_NUMPAD_ENTER:
|
||
|
case evt.KEY_NUMPAD_MINUS:
|
||
|
case evt.KEY_NUMPAD_DIVIDE:
|
||
|
break;
|
||
|
case evt.KEY_PAUSE:
|
||
|
case evt.KEY_TAB:
|
||
|
case evt.KEY_BACKSPACE:
|
||
|
case evt.KEY_ENTER:
|
||
|
case evt.KEY_ESCAPE:
|
||
|
case evt.KEY_PAGE_UP:
|
||
|
case evt.KEY_PAGE_DOWN:
|
||
|
case evt.KEY_END:
|
||
|
case evt.KEY_HOME:
|
||
|
case evt.KEY_LEFT_ARROW:
|
||
|
case evt.KEY_UP_ARROW:
|
||
|
case evt.KEY_RIGHT_ARROW:
|
||
|
case evt.KEY_DOWN_ARROW:
|
||
|
case evt.KEY_INSERT:
|
||
|
case evt.KEY_DELETE:
|
||
|
case evt.KEY_F1:
|
||
|
case evt.KEY_F2:
|
||
|
case evt.KEY_F3:
|
||
|
case evt.KEY_F4:
|
||
|
case evt.KEY_F5:
|
||
|
case evt.KEY_F6:
|
||
|
case evt.KEY_F7:
|
||
|
case evt.KEY_F8:
|
||
|
case evt.KEY_F9:
|
||
|
case evt.KEY_F10:
|
||
|
case evt.KEY_F11:
|
||
|
case evt.KEY_F12:
|
||
|
case evt.KEY_F12:
|
||
|
case evt.KEY_F13:
|
||
|
case evt.KEY_F14:
|
||
|
case evt.KEY_F15:
|
||
|
case evt.KEY_CLEAR:
|
||
|
case evt.KEY_HELP:
|
||
|
evt.key=evt.keyCode;
|
||
|
break;
|
||
|
default:
|
||
|
if(evt.ctrlKey||evt.altKey){
|
||
|
var _3a1=evt.keyCode;
|
||
|
if(_3a1>=65&&_3a1<=90&&evt.shiftKey==false){
|
||
|
_3a1+=32;
|
||
|
}
|
||
|
if(_3a1>=1&&_3a1<=26&&evt.ctrlKey){
|
||
|
_3a1+=96;
|
||
|
}
|
||
|
evt.key=String.fromCharCode(_3a1);
|
||
|
}
|
||
|
}
|
||
|
}else{
|
||
|
if(evt["type"]=="keypress"){
|
||
|
if(dojo.render.html.opera){
|
||
|
if(evt.which==0){
|
||
|
evt.key=evt.keyCode;
|
||
|
}else{
|
||
|
if(evt.which>0){
|
||
|
switch(evt.which){
|
||
|
case evt.KEY_SHIFT:
|
||
|
case evt.KEY_CTRL:
|
||
|
case evt.KEY_ALT:
|
||
|
case evt.KEY_CAPS_LOCK:
|
||
|
case evt.KEY_NUM_LOCK:
|
||
|
case evt.KEY_SCROLL_LOCK:
|
||
|
break;
|
||
|
case evt.KEY_PAUSE:
|
||
|
case evt.KEY_TAB:
|
||
|
case evt.KEY_BACKSPACE:
|
||
|
case evt.KEY_ENTER:
|
||
|
case evt.KEY_ESCAPE:
|
||
|
evt.key=evt.which;
|
||
|
break;
|
||
|
default:
|
||
|
var _3a1=evt.which;
|
||
|
if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){
|
||
|
_3a1+=32;
|
||
|
}
|
||
|
evt.key=String.fromCharCode(_3a1);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}else{
|
||
|
if(dojo.render.html.ie){
|
||
|
if(!evt.ctrlKey&&!evt.altKey&&evt.keyCode>=evt.KEY_SPACE){
|
||
|
evt.key=String.fromCharCode(evt.keyCode);
|
||
|
}
|
||
|
}else{
|
||
|
if(dojo.render.html.safari){
|
||
|
switch(evt.keyCode){
|
||
|
case 25:
|
||
|
evt.key=evt.KEY_TAB;
|
||
|
evt.shift=true;
|
||
|
break;
|
||
|
case 63232:
|
||
|
evt.key=evt.KEY_UP_ARROW;
|
||
|
break;
|
||
|
case 63233:
|
||
|
evt.key=evt.KEY_DOWN_ARROW;
|
||
|
break;
|
||
|
case 63234:
|
||
|
evt.key=evt.KEY_LEFT_ARROW;
|
||
|
break;
|
||
|
case 63235:
|
||
|
evt.key=evt.KEY_RIGHT_ARROW;
|
||
|
break;
|
||
|
case 63236:
|
||
|
evt.key=evt.KEY_F1;
|
||
|
break;
|
||
|
case 63237:
|
||
|
evt.key=evt.KEY_F2;
|
||
|
break;
|
||
|
case 63238:
|
||
|
evt.key=evt.KEY_F3;
|
||
|
break;
|
||
|
case 63239:
|
||
|
evt.key=evt.KEY_F4;
|
||
|
break;
|
||
|
case 63240:
|
||
|
evt.key=evt.KEY_F5;
|
||
|
break;
|
||
|
case 63241:
|
||
|
evt.key=evt.KEY_F6;
|
||
|
break;
|
||
|
case 63242:
|
||
|
evt.key=evt.KEY_F7;
|
||
|
break;
|
||
|
case 63243:
|
||
|
evt.key=evt.KEY_F8;
|
||
|
break;
|
||
|
case 63244:
|
||
|
evt.key=evt.KEY_F9;
|
||
|
break;
|
||
|
case 63245:
|
||
|
evt.key=evt.KEY_F10;
|
||
|
break;
|
||
|
case 63246:
|
||
|
evt.key=evt.KEY_F11;
|
||
|
break;
|
||
|
case 63247:
|
||
|
evt.key=evt.KEY_F12;
|
||
|
break;
|
||
|
case 63250:
|
||
|
evt.key=evt.KEY_PAUSE;
|
||
|
break;
|
||
|
case 63272:
|
||
|
evt.key=evt.KEY_DELETE;
|
||
|
break;
|
||
|
case 63273:
|
||
|
evt.key=evt.KEY_HOME;
|
||
|
break;
|
||
|
case 63275:
|
||
|
evt.key=evt.KEY_END;
|
||
|
break;
|
||
|
case 63276:
|
||
|
evt.key=evt.KEY_PAGE_UP;
|
||
|
break;
|
||
|
case 63277:
|
||
|
evt.key=evt.KEY_PAGE_DOWN;
|
||
|
break;
|
||
|
case 63302:
|
||
|
evt.key=evt.KEY_INSERT;
|
||
|
break;
|
||
|
case 63248:
|
||
|
case 63249:
|
||
|
case 63289:
|
||
|
break;
|
||
|
default:
|
||
|
evt.key=evt.charCode>=evt.KEY_SPACE?String.fromCharCode(evt.charCode):evt.keyCode;
|
||
|
}
|
||
|
}else{
|
||
|
evt.key=evt.charCode>0?String.fromCharCode(evt.charCode):evt.keyCode;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(dojo.render.html.ie){
|
||
|
if(!evt.target){
|
||
|
evt.target=evt.srcElement;
|
||
|
}
|
||
|
if(!evt.currentTarget){
|
||
|
evt.currentTarget=(_39f?_39f:evt.srcElement);
|
||
|
}
|
||
|
if(!evt.layerX){
|
||
|
evt.layerX=evt.offsetX;
|
||
|
}
|
||
|
if(!evt.layerY){
|
||
|
evt.layerY=evt.offsetY;
|
||
|
}
|
||
|
var doc=(evt.srcElement&&evt.srcElement.ownerDocument)?evt.srcElement.ownerDocument:document;
|
||
|
var _3a3=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;
|
||
|
if(!evt.pageX){
|
||
|
evt.pageX=evt.clientX+(_3a3.scrollLeft||0);
|
||
|
}
|
||
|
if(!evt.pageY){
|
||
|
evt.pageY=evt.clientY+(_3a3.scrollTop||0);
|
||
|
}
|
||
|
if(evt.type=="mouseover"){
|
||
|
evt.relatedTarget=evt.fromElement;
|
||
|
}
|
||
|
if(evt.type=="mouseout"){
|
||
|
evt.relatedTarget=evt.toElement;
|
||
|
}
|
||
|
this.currentEvent=evt;
|
||
|
evt.callListener=this.callListener;
|
||
|
evt.stopPropagation=this._stopPropagation;
|
||
|
evt.preventDefault=this._preventDefault;
|
||
|
}
|
||
|
return evt;
|
||
|
};
|
||
|
this.stopEvent=function(evt){
|
||
|
if(window.event){
|
||
|
evt.cancelBubble=true;
|
||
|
evt.returnValue=false;
|
||
|
}else{
|
||
|
evt.preventDefault();
|
||
|
evt.stopPropagation();
|
||
|
}
|
||
|
};
|
||
|
};
|
||
|
dojo.kwCompoundRequire({common:["dojo.event.common","dojo.event.topic"],browser:["dojo.event.browser"],dashboard:["dojo.event.browser"]});
|
||
|
dojo.provide("dojo.event.*");
|
||
|
if(!this["dojo"]){
|
||
|
alert("\"dojo/__package__.js\" is now located at \"dojo/dojo.js\". Please update your includes accordingly");
|
||
|
}
|
||
|
dojo.provide("dojo.lang.declare");
|
||
|
dojo.lang.declare=function(_3a5,_3a6,init,_3a8){
|
||
|
if((dojo.lang.isFunction(_3a8))||((!_3a8)&&(!dojo.lang.isFunction(init)))){
|
||
|
var temp=_3a8;
|
||
|
_3a8=init;
|
||
|
init=temp;
|
||
|
}
|
||
|
var _3aa=[];
|
||
|
if(dojo.lang.isArray(_3a6)){
|
||
|
_3aa=_3a6;
|
||
|
_3a6=_3aa.shift();
|
||
|
}
|
||
|
if(!init){
|
||
|
init=dojo.evalObjPath(_3a5,false);
|
||
|
if((init)&&(!dojo.lang.isFunction(init))){
|
||
|
init=null;
|
||
|
}
|
||
|
}
|
||
|
var ctor=dojo.lang.declare._makeConstructor();
|
||
|
var scp=(_3a6?_3a6.prototype:null);
|
||
|
if(scp){
|
||
|
scp.prototyping=true;
|
||
|
ctor.prototype=new _3a6();
|
||
|
scp.prototyping=false;
|
||
|
}
|
||
|
ctor.superclass=scp;
|
||
|
ctor.mixins=_3aa;
|
||
|
for(var i=0,l=_3aa.length;i<l;i++){
|
||
|
dojo.lang.extend(ctor,_3aa[i].prototype);
|
||
|
}
|
||
|
ctor.prototype.initializer=null;
|
||
|
ctor.prototype.declaredClass=_3a5;
|
||
|
if(dojo.lang.isArray(_3a8)){
|
||
|
dojo.lang.extend.apply(dojo.lang,[ctor].concat(_3a8));
|
||
|
}else{
|
||
|
dojo.lang.extend(ctor,(_3a8)||{});
|
||
|
}
|
||
|
dojo.lang.extend(ctor,dojo.lang.declare._common);
|
||
|
ctor.prototype.constructor=ctor;
|
||
|
ctor.prototype.initializer=(ctor.prototype.initializer)||(init)||(function(){
|
||
|
});
|
||
|
var _3af=dojo.parseObjPath(_3a5,null,true);
|
||
|
_3af.obj[_3af.prop]=ctor;
|
||
|
return ctor;
|
||
|
};
|
||
|
dojo.lang.declare._makeConstructor=function(){
|
||
|
return function(){
|
||
|
var self=this._getPropContext();
|
||
|
var s=self.constructor.superclass;
|
||
|
if((s)&&(s.constructor)){
|
||
|
if(s.constructor==arguments.callee){
|
||
|
this._inherited("constructor",arguments);
|
||
|
}else{
|
||
|
this._contextMethod(s,"constructor",arguments);
|
||
|
}
|
||
|
}
|
||
|
var ms=(self.constructor.mixins)||([]);
|
||
|
for(var i=0,m;(m=ms[i]);i++){
|
||
|
(((m.prototype)&&(m.prototype.initializer))||(m)).apply(this,arguments);
|
||
|
}
|
||
|
if((!this.prototyping)&&(self.initializer)){
|
||
|
self.initializer.apply(this,arguments);
|
||
|
}
|
||
|
};
|
||
|
};
|
||
|
dojo.lang.declare._common={_getPropContext:function(){
|
||
|
return (this.___proto||this);
|
||
|
},_contextMethod:function(_3b5,_3b6,args){
|
||
|
var _3b8,_3b9=this.___proto;
|
||
|
this.___proto=_3b5;
|
||
|
try{
|
||
|
_3b8=_3b5[_3b6].apply(this,(args||[]));
|
||
|
}
|
||
|
catch(e){
|
||
|
throw e;
|
||
|
}
|
||
|
finally{
|
||
|
this.___proto=_3b9;
|
||
|
}
|
||
|
return _3b8;
|
||
|
},_inherited:function(prop,args){
|
||
|
var p=this._getPropContext();
|
||
|
do{
|
||
|
if((!p.constructor)||(!p.constructor.superclass)){
|
||
|
return;
|
||
|
}
|
||
|
p=p.constructor.superclass;
|
||
|
}while(!(prop in p));
|
||
|
return (dojo.lang.isFunction(p[prop])?this._contextMethod(p,prop,args):p[prop]);
|
||
|
},inherited:function(prop,args){
|
||
|
dojo.deprecated("'inherited' method is dangerous, do not up-call! 'inherited' is slated for removal in 0.5; name your super class (or use superclass property) instead.","0.5");
|
||
|
this._inherited(prop,args);
|
||
|
}};
|
||
|
dojo.declare=dojo.lang.declare;
|
||
|
dojo.provide("dojo.widget.TreeWithNode");
|
||
|
dojo.declare("dojo.widget.TreeWithNode",null,function(){
|
||
|
},{loadStates:{UNCHECKED:"UNCHECKED",LOADING:"LOADING",LOADED:"LOADED"},state:"UNCHECKED",objectId:"",isContainer:true,lockLevel:0,lock:function(){
|
||
|
this.lockLevel++;
|
||
|
},unlock:function(){
|
||
|
if(!this.lockLevel){
|
||
|
dojo.raise(this.widgetType+" unlock: not locked");
|
||
|
}
|
||
|
this.lockLevel--;
|
||
|
},expandLevel:0,loadLevel:0,hasLock:function(){
|
||
|
return this.lockLevel>0;
|
||
|
},isLocked:function(){
|
||
|
var node=this;
|
||
|
while(true){
|
||
|
if(node.lockLevel){
|
||
|
return true;
|
||
|
}
|
||
|
if(!node.parent||node.isTree){
|
||
|
break;
|
||
|
}
|
||
|
node=node.parent;
|
||
|
}
|
||
|
return false;
|
||
|
},flushLock:function(){
|
||
|
this.lockLevel=0;
|
||
|
},actionIsDisabled:function(_3c0){
|
||
|
var _3c1=false;
|
||
|
if(dojo.lang.inArray(this.actionsDisabled,_3c0)){
|
||
|
_3c1=true;
|
||
|
}
|
||
|
if(this.isTreeNode){
|
||
|
if(!this.tree.allowAddChildToLeaf&&_3c0==this.actions.ADDCHILD&&!this.isFolder){
|
||
|
_3c1=true;
|
||
|
}
|
||
|
}
|
||
|
return _3c1;
|
||
|
},actionIsDisabledNow:function(_3c2){
|
||
|
return this.actionIsDisabled(_3c2)||this.isLocked();
|
||
|
},setChildren:function(_3c3){
|
||
|
if(this.isTreeNode&&!this.isFolder){
|
||
|
this.setFolder();
|
||
|
}else{
|
||
|
if(this.isTreeNode){
|
||
|
this.state=this.loadStates.LOADED;
|
||
|
}
|
||
|
}
|
||
|
var _3c4=this.children.length>0;
|
||
|
if(_3c4&&_3c3){
|
||
|
this.destroyChildren();
|
||
|
}
|
||
|
if(_3c3){
|
||
|
this.children=_3c3;
|
||
|
}
|
||
|
var _3c5=this.children.length>0;
|
||
|
if(this.isTreeNode&&_3c5!=_3c4){
|
||
|
this.viewSetHasChildren();
|
||
|
}
|
||
|
for(var i=0;i<this.children.length;i++){
|
||
|
var _3c7=this.children[i];
|
||
|
if(!(_3c7 instanceof dojo.widget.Widget)){
|
||
|
_3c7=this.children[i]=this.tree.createNode(_3c7);
|
||
|
var _3c8=true;
|
||
|
}else{
|
||
|
var _3c8=false;
|
||
|
}
|
||
|
if(!_3c7.parent){
|
||
|
_3c7.parent=this;
|
||
|
if(this.tree!==_3c7.tree){
|
||
|
_3c7.updateTree(this.tree);
|
||
|
}
|
||
|
_3c7.viewAddLayout();
|
||
|
this.containerNode.appendChild(_3c7.domNode);
|
||
|
var _3c9={child:_3c7,index:i,parent:this,childWidgetCreated:_3c8};
|
||
|
delete dojo.widget.manager.topWidgets[_3c7.widgetId];
|
||
|
dojo.event.topic.publish(this.tree.eventNames.afterAddChild,_3c9);
|
||
|
}
|
||
|
if(this.tree.eagerWidgetInstantiation){
|
||
|
dojo.lang.forEach(this.children,function(_3ca){
|
||
|
_3ca.setChildren();
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
},doAddChild:function(_3cb,_3cc){
|
||
|
return this.addChild(_3cb,_3cc,true);
|
||
|
},addChild:function(_3cd,_3ce,_3cf){
|
||
|
if(dojo.lang.isUndefined(_3ce)){
|
||
|
_3ce=this.children.length;
|
||
|
}
|
||
|
if(!_3cd.isTreeNode){
|
||
|
dojo.raise("You can only add TreeNode widgets to a "+this.widgetType+" widget!");
|
||
|
return;
|
||
|
}
|
||
|
this.children.splice(_3ce,0,_3cd);
|
||
|
_3cd.parent=this;
|
||
|
_3cd.addedTo(this,_3ce,_3cf);
|
||
|
delete dojo.widget.manager.topWidgets[_3cd.widgetId];
|
||
|
},onShow:function(){
|
||
|
this.animationInProgress=false;
|
||
|
},onHide:function(){
|
||
|
this.animationInProgress=false;
|
||
|
}});
|
||
|
dojo.provide("dojo.xml.Parse");
|
||
|
dojo.xml.Parse=function(){
|
||
|
var isIE=((dojo.render.html.capable)&&(dojo.render.html.ie));
|
||
|
function getTagName(node){
|
||
|
try{
|
||
|
return node.tagName.toLowerCase();
|
||
|
}
|
||
|
catch(e){
|
||
|
return "";
|
||
|
}
|
||
|
}
|
||
|
function getDojoTagName(node){
|
||
|
var _3d3=getTagName(node);
|
||
|
if(!_3d3){
|
||
|
return "";
|
||
|
}
|
||
|
if((dojo.widget)&&(dojo.widget.tags[_3d3])){
|
||
|
return _3d3;
|
||
|
}
|
||
|
var p=_3d3.indexOf(":");
|
||
|
if(p>=0){
|
||
|
return _3d3;
|
||
|
}
|
||
|
if(_3d3.substr(0,5)=="dojo:"){
|
||
|
return _3d3;
|
||
|
}
|
||
|
if(dojo.render.html.capable&&dojo.render.html.ie&&node.scopeName!="HTML"){
|
||
|
return node.scopeName.toLowerCase()+":"+_3d3;
|
||
|
}
|
||
|
if(_3d3.substr(0,4)=="dojo"){
|
||
|
return "dojo:"+_3d3.substring(4);
|
||
|
}
|
||
|
var djt=node.getAttribute("dojoType")||node.getAttribute("dojotype");
|
||
|
if(djt){
|
||
|
if(djt.indexOf(":")<0){
|
||
|
djt="dojo:"+djt;
|
||
|
}
|
||
|
return djt.toLowerCase();
|
||
|
}
|
||
|
djt=node.getAttributeNS&&node.getAttributeNS(dojo.dom.dojoml,"type");
|
||
|
if(djt){
|
||
|
return "dojo:"+djt.toLowerCase();
|
||
|
}
|
||
|
try{
|
||
|
djt=node.getAttribute("dojo:type");
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
if(djt){
|
||
|
return "dojo:"+djt.toLowerCase();
|
||
|
}
|
||
|
if((dj_global["djConfig"])&&(!djConfig["ignoreClassNames"])){
|
||
|
var _3d6=node.className||node.getAttribute("class");
|
||
|
if((_3d6)&&(_3d6.indexOf)&&(_3d6.indexOf("dojo-")!=-1)){
|
||
|
var _3d7=_3d6.split(" ");
|
||
|
for(var x=0,c=_3d7.length;x<c;x++){
|
||
|
if(_3d7[x].slice(0,5)=="dojo-"){
|
||
|
return "dojo:"+_3d7[x].substr(5).toLowerCase();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return "";
|
||
|
}
|
||
|
this.parseElement=function(node,_3db,_3dc,_3dd){
|
||
|
var _3de=getTagName(node);
|
||
|
if(isIE&&_3de.indexOf("/")==0){
|
||
|
return null;
|
||
|
}
|
||
|
try{
|
||
|
var attr=node.getAttribute("parseWidgets");
|
||
|
if(attr&&attr.toLowerCase()=="false"){
|
||
|
return {};
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
var _3e0=true;
|
||
|
if(_3dc){
|
||
|
var _3e1=getDojoTagName(node);
|
||
|
_3de=_3e1||_3de;
|
||
|
_3e0=Boolean(_3e1);
|
||
|
}
|
||
|
var _3e2={};
|
||
|
_3e2[_3de]=[];
|
||
|
var pos=_3de.indexOf(":");
|
||
|
if(pos>0){
|
||
|
var ns=_3de.substring(0,pos);
|
||
|
_3e2["ns"]=ns;
|
||
|
if((dojo.ns)&&(!dojo.ns.allow(ns))){
|
||
|
_3e0=false;
|
||
|
}
|
||
|
}
|
||
|
if(_3e0){
|
||
|
var _3e5=this.parseAttributes(node);
|
||
|
for(var attr in _3e5){
|
||
|
if((!_3e2[_3de][attr])||(typeof _3e2[_3de][attr]!="array")){
|
||
|
_3e2[_3de][attr]=[];
|
||
|
}
|
||
|
_3e2[_3de][attr].push(_3e5[attr]);
|
||
|
}
|
||
|
_3e2[_3de].nodeRef=node;
|
||
|
_3e2.tagName=_3de;
|
||
|
_3e2.index=_3dd||0;
|
||
|
}
|
||
|
var _3e6=0;
|
||
|
for(var i=0;i<node.childNodes.length;i++){
|
||
|
var tcn=node.childNodes.item(i);
|
||
|
switch(tcn.nodeType){
|
||
|
case dojo.dom.ELEMENT_NODE:
|
||
|
var ctn=getDojoTagName(tcn)||getTagName(tcn);
|
||
|
if(!_3e2[ctn]){
|
||
|
_3e2[ctn]=[];
|
||
|
}
|
||
|
_3e2[ctn].push(this.parseElement(tcn,true,_3dc,_3e6));
|
||
|
if((tcn.childNodes.length==1)&&(tcn.childNodes.item(0).nodeType==dojo.dom.TEXT_NODE)){
|
||
|
_3e2[ctn][_3e2[ctn].length-1].value=tcn.childNodes.item(0).nodeValue;
|
||
|
}
|
||
|
_3e6++;
|
||
|
break;
|
||
|
case dojo.dom.TEXT_NODE:
|
||
|
if(node.childNodes.length==1){
|
||
|
_3e2[_3de].push({value:node.childNodes.item(0).nodeValue});
|
||
|
}
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
return _3e2;
|
||
|
};
|
||
|
this.parseAttributes=function(node){
|
||
|
var _3eb={};
|
||
|
var atts=node.attributes;
|
||
|
var _3ed,i=0;
|
||
|
while((_3ed=atts[i++])){
|
||
|
if(isIE){
|
||
|
if(!_3ed){
|
||
|
continue;
|
||
|
}
|
||
|
if((typeof _3ed=="object")&&(typeof _3ed.nodeValue=="undefined")||(_3ed.nodeValue==null)||(_3ed.nodeValue=="")){
|
||
|
continue;
|
||
|
}
|
||
|
}
|
||
|
var nn=_3ed.nodeName.split(":");
|
||
|
nn=(nn.length==2)?nn[1]:_3ed.nodeName;
|
||
|
_3eb[nn]={value:_3ed.nodeValue};
|
||
|
}
|
||
|
return _3eb;
|
||
|
};
|
||
|
};
|
||
|
dojo.provide("dojo.ns");
|
||
|
dojo.ns={namespaces:{},failed:{},loading:{},loaded:{},register:function(name,_3f1,_3f2,_3f3){
|
||
|
if(!_3f3||!this.namespaces[name]){
|
||
|
this.namespaces[name]=new dojo.ns.Ns(name,_3f1,_3f2);
|
||
|
}
|
||
|
},allow:function(name){
|
||
|
if(this.failed[name]){
|
||
|
return false;
|
||
|
}
|
||
|
if((djConfig.excludeNamespace)&&(dojo.lang.inArray(djConfig.excludeNamespace,name))){
|
||
|
return false;
|
||
|
}
|
||
|
return ((name==this.dojo)||(!djConfig.includeNamespace)||(dojo.lang.inArray(djConfig.includeNamespace,name)));
|
||
|
},get:function(name){
|
||
|
return this.namespaces[name];
|
||
|
},require:function(name){
|
||
|
var ns=this.namespaces[name];
|
||
|
if((ns)&&(this.loaded[name])){
|
||
|
return ns;
|
||
|
}
|
||
|
if(!this.allow(name)){
|
||
|
return false;
|
||
|
}
|
||
|
if(this.loading[name]){
|
||
|
dojo.debug("dojo.namespace.require: re-entrant request to load namespace \""+name+"\" must fail.");
|
||
|
return false;
|
||
|
}
|
||
|
var req=dojo.require;
|
||
|
this.loading[name]=true;
|
||
|
try{
|
||
|
if(name=="dojo"){
|
||
|
req("dojo.namespaces.dojo");
|
||
|
}else{
|
||
|
if(!dojo.hostenv.moduleHasPrefix(name)){
|
||
|
dojo.registerModulePath(name,"../"+name);
|
||
|
}
|
||
|
req([name,"manifest"].join("."),false,true);
|
||
|
}
|
||
|
if(!this.namespaces[name]){
|
||
|
this.failed[name]=true;
|
||
|
}
|
||
|
}
|
||
|
finally{
|
||
|
this.loading[name]=false;
|
||
|
}
|
||
|
return this.namespaces[name];
|
||
|
}};
|
||
|
dojo.ns.Ns=function(name,_3fa,_3fb){
|
||
|
this.name=name;
|
||
|
this.module=_3fa;
|
||
|
this.resolver=_3fb;
|
||
|
this._loaded=[];
|
||
|
this._failed=[];
|
||
|
};
|
||
|
dojo.ns.Ns.prototype.resolve=function(name,_3fd,_3fe){
|
||
|
if(!this.resolver||djConfig["skipAutoRequire"]){
|
||
|
return false;
|
||
|
}
|
||
|
var _3ff=this.resolver(name,_3fd);
|
||
|
if((_3ff)&&(!this._loaded[_3ff])&&(!this._failed[_3ff])){
|
||
|
var req=dojo.require;
|
||
|
req(_3ff,false,true);
|
||
|
if(dojo.hostenv.findModule(_3ff,false)){
|
||
|
this._loaded[_3ff]=true;
|
||
|
}else{
|
||
|
if(!_3fe){
|
||
|
dojo.raise("dojo.ns.Ns.resolve: module '"+_3ff+"' not found after loading via namespace '"+this.name+"'");
|
||
|
}
|
||
|
this._failed[_3ff]=true;
|
||
|
}
|
||
|
}
|
||
|
return Boolean(this._loaded[_3ff]);
|
||
|
};
|
||
|
dojo.registerNamespace=function(name,_402,_403){
|
||
|
dojo.ns.register.apply(dojo.ns,arguments);
|
||
|
};
|
||
|
dojo.registerNamespaceResolver=function(name,_405){
|
||
|
var n=dojo.ns.namespaces[name];
|
||
|
if(n){
|
||
|
n.resolver=_405;
|
||
|
}
|
||
|
};
|
||
|
dojo.registerNamespaceManifest=function(_407,path,name,_40a,_40b){
|
||
|
dojo.registerModulePath(name,path);
|
||
|
dojo.registerNamespace(name,_40a,_40b);
|
||
|
};
|
||
|
dojo.registerNamespace("dojo","dojo.widget");
|
||
|
dojo.provide("dojo.widget.Manager");
|
||
|
dojo.widget.manager=new function(){
|
||
|
this.widgets=[];
|
||
|
this.widgetIds=[];
|
||
|
this.topWidgets={};
|
||
|
var _40c={};
|
||
|
var _40d=[];
|
||
|
this.getUniqueId=function(_40e){
|
||
|
var _40f;
|
||
|
do{
|
||
|
_40f=_40e+"_"+(_40c[_40e]!=undefined?++_40c[_40e]:_40c[_40e]=0);
|
||
|
}while(this.getWidgetById(_40f));
|
||
|
return _40f;
|
||
|
};
|
||
|
this.add=function(_410){
|
||
|
this.widgets.push(_410);
|
||
|
if(!_410.extraArgs["id"]){
|
||
|
_410.extraArgs["id"]=_410.extraArgs["ID"];
|
||
|
}
|
||
|
if(_410.widgetId==""){
|
||
|
if(_410["id"]){
|
||
|
_410.widgetId=_410["id"];
|
||
|
}else{
|
||
|
if(_410.extraArgs["id"]){
|
||
|
_410.widgetId=_410.extraArgs["id"];
|
||
|
}else{
|
||
|
_410.widgetId=this.getUniqueId(_410.ns+"_"+_410.widgetType);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(this.widgetIds[_410.widgetId]){
|
||
|
dojo.debug("widget ID collision on ID: "+_410.widgetId);
|
||
|
}
|
||
|
this.widgetIds[_410.widgetId]=_410;
|
||
|
};
|
||
|
this.destroyAll=function(){
|
||
|
for(var x=this.widgets.length-1;x>=0;x--){
|
||
|
try{
|
||
|
this.widgets[x].destroy(true);
|
||
|
delete this.widgets[x];
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
this.remove=function(_412){
|
||
|
if(dojo.lang.isNumber(_412)){
|
||
|
var tw=this.widgets[_412].widgetId;
|
||
|
delete this.topWidgets[tw];
|
||
|
delete this.widgetIds[tw];
|
||
|
this.widgets.splice(_412,1);
|
||
|
}else{
|
||
|
this.removeById(_412);
|
||
|
}
|
||
|
};
|
||
|
this.removeById=function(id){
|
||
|
if(!dojo.lang.isString(id)){
|
||
|
id=id["widgetId"];
|
||
|
if(!id){
|
||
|
dojo.debug("invalid widget or id passed to removeById");
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
for(var i=0;i<this.widgets.length;i++){
|
||
|
if(this.widgets[i].widgetId==id){
|
||
|
this.remove(i);
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
this.getWidgetById=function(id){
|
||
|
if(dojo.lang.isString(id)){
|
||
|
return this.widgetIds[id];
|
||
|
}
|
||
|
return id;
|
||
|
};
|
||
|
this.getWidgetsByType=function(type){
|
||
|
var lt=type.toLowerCase();
|
||
|
var _419=(type.indexOf(":")<0?function(x){
|
||
|
return x.widgetType.toLowerCase();
|
||
|
}:function(x){
|
||
|
return x.getNamespacedType();
|
||
|
});
|
||
|
var ret=[];
|
||
|
dojo.lang.forEach(this.widgets,function(x){
|
||
|
if(_419(x)==lt){
|
||
|
ret.push(x);
|
||
|
}
|
||
|
});
|
||
|
return ret;
|
||
|
};
|
||
|
this.getWidgetsByFilter=function(_41e,_41f){
|
||
|
var ret=[];
|
||
|
dojo.lang.every(this.widgets,function(x){
|
||
|
if(_41e(x)){
|
||
|
ret.push(x);
|
||
|
if(_41f){
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
return true;
|
||
|
});
|
||
|
return (_41f?ret[0]:ret);
|
||
|
};
|
||
|
this.getAllWidgets=function(){
|
||
|
return this.widgets.concat();
|
||
|
};
|
||
|
this.getWidgetByNode=function(node){
|
||
|
var w=this.getAllWidgets();
|
||
|
node=dojo.byId(node);
|
||
|
for(var i=0;i<w.length;i++){
|
||
|
if(w[i].domNode==node){
|
||
|
return w[i];
|
||
|
}
|
||
|
}
|
||
|
return null;
|
||
|
};
|
||
|
this.byId=this.getWidgetById;
|
||
|
this.byType=this.getWidgetsByType;
|
||
|
this.byFilter=this.getWidgetsByFilter;
|
||
|
this.byNode=this.getWidgetByNode;
|
||
|
var _425={};
|
||
|
var _426=["dojo.widget"];
|
||
|
for(var i=0;i<_426.length;i++){
|
||
|
_426[_426[i]]=true;
|
||
|
}
|
||
|
this.registerWidgetPackage=function(_428){
|
||
|
if(!_426[_428]){
|
||
|
_426[_428]=true;
|
||
|
_426.push(_428);
|
||
|
}
|
||
|
};
|
||
|
this.getWidgetPackageList=function(){
|
||
|
return dojo.lang.map(_426,function(elt){
|
||
|
return (elt!==true?elt:undefined);
|
||
|
});
|
||
|
};
|
||
|
this.getImplementation=function(_42a,_42b,_42c,ns){
|
||
|
var impl=this.getImplementationName(_42a,ns);
|
||
|
if(impl){
|
||
|
var ret=_42b?new impl(_42b):new impl();
|
||
|
return ret;
|
||
|
}
|
||
|
};
|
||
|
function buildPrefixCache(){
|
||
|
for(var _430 in dojo.render){
|
||
|
if(dojo.render[_430]["capable"]===true){
|
||
|
var _431=dojo.render[_430].prefixes;
|
||
|
for(var i=0;i<_431.length;i++){
|
||
|
_40d.push(_431[i].toLowerCase());
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
var _433=function(_434,_435){
|
||
|
if(!_435){
|
||
|
return null;
|
||
|
}
|
||
|
for(var i=0,l=_40d.length,_438;i<=l;i++){
|
||
|
_438=(i<l?_435[_40d[i]]:_435);
|
||
|
if(!_438){
|
||
|
continue;
|
||
|
}
|
||
|
for(var name in _438){
|
||
|
if(name.toLowerCase()==_434){
|
||
|
return _438[name];
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return null;
|
||
|
};
|
||
|
var _43a=function(_43b,_43c){
|
||
|
var _43d=dojo.evalObjPath(_43c,false);
|
||
|
return (_43d?_433(_43b,_43d):null);
|
||
|
};
|
||
|
this.getImplementationName=function(_43e,ns){
|
||
|
var _440=_43e.toLowerCase();
|
||
|
ns=ns||"dojo";
|
||
|
var imps=_425[ns]||(_425[ns]={});
|
||
|
var impl=imps[_440];
|
||
|
if(impl){
|
||
|
return impl;
|
||
|
}
|
||
|
if(!_40d.length){
|
||
|
buildPrefixCache();
|
||
|
}
|
||
|
var _443=dojo.ns.get(ns);
|
||
|
if(!_443){
|
||
|
dojo.ns.register(ns,ns+".widget");
|
||
|
_443=dojo.ns.get(ns);
|
||
|
}
|
||
|
if(_443){
|
||
|
_443.resolve(_43e);
|
||
|
}
|
||
|
impl=_43a(_440,_443.module);
|
||
|
if(impl){
|
||
|
return (imps[_440]=impl);
|
||
|
}
|
||
|
_443=dojo.ns.require(ns);
|
||
|
if((_443)&&(_443.resolver)){
|
||
|
_443.resolve(_43e);
|
||
|
impl=_43a(_440,_443.module);
|
||
|
if(impl){
|
||
|
return (imps[_440]=impl);
|
||
|
}
|
||
|
}
|
||
|
dojo.deprecated("dojo.widget.Manager.getImplementationName","Could not locate widget implementation for \""+_43e+"\" in \""+_443.module+"\" registered to namespace \""+_443.name+"\". "+"Developers must specify correct namespaces for all non-Dojo widgets","0.5");
|
||
|
for(var i=0;i<_426.length;i++){
|
||
|
impl=_43a(_440,_426[i]);
|
||
|
if(impl){
|
||
|
return (imps[_440]=impl);
|
||
|
}
|
||
|
}
|
||
|
throw new Error("Could not locate widget implementation for \""+_43e+"\" in \""+_443.module+"\" registered to namespace \""+_443.name+"\"");
|
||
|
};
|
||
|
this.resizing=false;
|
||
|
this.onWindowResized=function(){
|
||
|
if(this.resizing){
|
||
|
return;
|
||
|
}
|
||
|
try{
|
||
|
this.resizing=true;
|
||
|
for(var id in this.topWidgets){
|
||
|
var _446=this.topWidgets[id];
|
||
|
if(_446.checkSize){
|
||
|
_446.checkSize();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
finally{
|
||
|
this.resizing=false;
|
||
|
}
|
||
|
};
|
||
|
if(typeof window!="undefined"){
|
||
|
dojo.addOnLoad(this,"onWindowResized");
|
||
|
dojo.event.connect(window,"onresize",this,"onWindowResized");
|
||
|
}
|
||
|
};
|
||
|
(function(){
|
||
|
var dw=dojo.widget;
|
||
|
var dwm=dw.manager;
|
||
|
var h=dojo.lang.curry(dojo.lang,"hitch",dwm);
|
||
|
var g=function(_44b,_44c){
|
||
|
dw[(_44c||_44b)]=h(_44b);
|
||
|
};
|
||
|
g("add","addWidget");
|
||
|
g("destroyAll","destroyAllWidgets");
|
||
|
g("remove","removeWidget");
|
||
|
g("removeById","removeWidgetById");
|
||
|
g("getWidgetById");
|
||
|
g("getWidgetById","byId");
|
||
|
g("getWidgetsByType");
|
||
|
g("getWidgetsByFilter");
|
||
|
g("getWidgetsByType","byType");
|
||
|
g("getWidgetsByFilter","byFilter");
|
||
|
g("getWidgetByNode","byNode");
|
||
|
dw.all=function(n){
|
||
|
var _44e=dwm.getAllWidgets.apply(dwm,arguments);
|
||
|
if(arguments.length>0){
|
||
|
return _44e[n];
|
||
|
}
|
||
|
return _44e;
|
||
|
};
|
||
|
g("registerWidgetPackage");
|
||
|
g("getImplementation","getWidgetImplementation");
|
||
|
g("getImplementationName","getWidgetImplementationName");
|
||
|
dw.widgets=dwm.widgets;
|
||
|
dw.widgetIds=dwm.widgetIds;
|
||
|
dw.root=dwm.root;
|
||
|
})();
|
||
|
dojo.provide("dojo.uri.Uri");
|
||
|
dojo.uri=new function(){
|
||
|
this.dojoUri=function(uri){
|
||
|
return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(),uri);
|
||
|
};
|
||
|
this.moduleUri=function(_450,uri){
|
||
|
var loc=dojo.hostenv.getModuleSymbols(_450).join("/");
|
||
|
if(!loc){
|
||
|
return null;
|
||
|
}
|
||
|
if(loc.lastIndexOf("/")!=loc.length-1){
|
||
|
loc+="/";
|
||
|
}
|
||
|
var _453=loc.indexOf(":");
|
||
|
var _454=loc.indexOf("/");
|
||
|
if(loc.charAt(0)!="/"&&(_453==-1||_453>_454)){
|
||
|
loc=dojo.hostenv.getBaseScriptUri()+loc;
|
||
|
}
|
||
|
return new dojo.uri.Uri(loc,uri);
|
||
|
};
|
||
|
this.Uri=function(){
|
||
|
var uri=arguments[0];
|
||
|
for(var i=1;i<arguments.length;i++){
|
||
|
if(!arguments[i]){
|
||
|
continue;
|
||
|
}
|
||
|
var _457=new dojo.uri.Uri(arguments[i].toString());
|
||
|
var _458=new dojo.uri.Uri(uri.toString());
|
||
|
if((_457.path=="")&&(_457.scheme==null)&&(_457.authority==null)&&(_457.query==null)){
|
||
|
if(_457.fragment!=null){
|
||
|
_458.fragment=_457.fragment;
|
||
|
}
|
||
|
_457=_458;
|
||
|
}else{
|
||
|
if(_457.scheme==null){
|
||
|
_457.scheme=_458.scheme;
|
||
|
if(_457.authority==null){
|
||
|
_457.authority=_458.authority;
|
||
|
if(_457.path.charAt(0)!="/"){
|
||
|
var path=_458.path.substring(0,_458.path.lastIndexOf("/")+1)+_457.path;
|
||
|
var segs=path.split("/");
|
||
|
for(var j=0;j<segs.length;j++){
|
||
|
if(segs[j]=="."){
|
||
|
if(j==segs.length-1){
|
||
|
segs[j]="";
|
||
|
}else{
|
||
|
segs.splice(j,1);
|
||
|
j--;
|
||
|
}
|
||
|
}else{
|
||
|
if(j>0&&!(j==1&&segs[0]=="")&&segs[j]==".."&&segs[j-1]!=".."){
|
||
|
if(j==segs.length-1){
|
||
|
segs.splice(j,1);
|
||
|
segs[j-1]="";
|
||
|
}else{
|
||
|
segs.splice(j-1,2);
|
||
|
j-=2;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
_457.path=segs.join("/");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
uri="";
|
||
|
if(_457.scheme!=null){
|
||
|
uri+=_457.scheme+":";
|
||
|
}
|
||
|
if(_457.authority!=null){
|
||
|
uri+="//"+_457.authority;
|
||
|
}
|
||
|
uri+=_457.path;
|
||
|
if(_457.query!=null){
|
||
|
uri+="?"+_457.query;
|
||
|
}
|
||
|
if(_457.fragment!=null){
|
||
|
uri+="#"+_457.fragment;
|
||
|
}
|
||
|
}
|
||
|
this.uri=uri.toString();
|
||
|
var _45c="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
|
||
|
var r=this.uri.match(new RegExp(_45c));
|
||
|
this.scheme=r[2]||(r[1]?"":null);
|
||
|
this.authority=r[4]||(r[3]?"":null);
|
||
|
this.path=r[5];
|
||
|
this.query=r[7]||(r[6]?"":null);
|
||
|
this.fragment=r[9]||(r[8]?"":null);
|
||
|
if(this.authority!=null){
|
||
|
_45c="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";
|
||
|
r=this.authority.match(new RegExp(_45c));
|
||
|
this.user=r[3]||null;
|
||
|
this.password=r[4]||null;
|
||
|
this.host=r[5];
|
||
|
this.port=r[7]||null;
|
||
|
}
|
||
|
this.toString=function(){
|
||
|
return this.uri;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
dojo.kwCompoundRequire({common:[["dojo.uri.Uri",false,false]]});
|
||
|
dojo.provide("dojo.uri.*");
|
||
|
dojo.provide("dojo.html.common");
|
||
|
dojo.lang.mixin(dojo.html,dojo.dom);
|
||
|
dojo.html.body=function(){
|
||
|
dojo.deprecated("dojo.html.body() moved to dojo.body()","0.5");
|
||
|
return dojo.body();
|
||
|
};
|
||
|
dojo.html.getEventTarget=function(evt){
|
||
|
if(!evt){
|
||
|
evt=dojo.global().event||{};
|
||
|
}
|
||
|
var t=(evt.srcElement?evt.srcElement:(evt.target?evt.target:null));
|
||
|
while((t)&&(t.nodeType!=1)){
|
||
|
t=t.parentNode;
|
||
|
}
|
||
|
return t;
|
||
|
};
|
||
|
dojo.html.getViewport=function(){
|
||
|
var _460=dojo.global();
|
||
|
var _461=dojo.doc();
|
||
|
var w=0;
|
||
|
var h=0;
|
||
|
if(dojo.render.html.mozilla){
|
||
|
w=_461.documentElement.clientWidth;
|
||
|
h=_460.innerHeight;
|
||
|
}else{
|
||
|
if(!dojo.render.html.opera&&_460.innerWidth){
|
||
|
w=_460.innerWidth;
|
||
|
h=_460.innerHeight;
|
||
|
}else{
|
||
|
if(!dojo.render.html.opera&&dojo.exists(_461,"documentElement.clientWidth")){
|
||
|
var w2=_461.documentElement.clientWidth;
|
||
|
if(!w||w2&&w2<w){
|
||
|
w=w2;
|
||
|
}
|
||
|
h=_461.documentElement.clientHeight;
|
||
|
}else{
|
||
|
if(dojo.body().clientWidth){
|
||
|
w=dojo.body().clientWidth;
|
||
|
h=dojo.body().clientHeight;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return {width:w,height:h};
|
||
|
};
|
||
|
dojo.html.getScroll=function(){
|
||
|
var _465=dojo.global();
|
||
|
var _466=dojo.doc();
|
||
|
var top=_465.pageYOffset||_466.documentElement.scrollTop||dojo.body().scrollTop||0;
|
||
|
var left=_465.pageXOffset||_466.documentElement.scrollLeft||dojo.body().scrollLeft||0;
|
||
|
return {top:top,left:left,offset:{x:left,y:top}};
|
||
|
};
|
||
|
dojo.html.getParentByType=function(node,type){
|
||
|
var _46b=dojo.doc();
|
||
|
var _46c=dojo.byId(node);
|
||
|
type=type.toLowerCase();
|
||
|
while((_46c)&&(_46c.nodeName.toLowerCase()!=type)){
|
||
|
if(_46c==(_46b["body"]||_46b["documentElement"])){
|
||
|
return null;
|
||
|
}
|
||
|
_46c=_46c.parentNode;
|
||
|
}
|
||
|
return _46c;
|
||
|
};
|
||
|
dojo.html.getAttribute=function(node,attr){
|
||
|
node=dojo.byId(node);
|
||
|
if((!node)||(!node.getAttribute)){
|
||
|
return null;
|
||
|
}
|
||
|
var ta=typeof attr=="string"?attr:new String(attr);
|
||
|
var v=node.getAttribute(ta.toUpperCase());
|
||
|
if((v)&&(typeof v=="string")&&(v!="")){
|
||
|
return v;
|
||
|
}
|
||
|
if(v&&v.value){
|
||
|
return v.value;
|
||
|
}
|
||
|
if((node.getAttributeNode)&&(node.getAttributeNode(ta))){
|
||
|
return (node.getAttributeNode(ta)).value;
|
||
|
}else{
|
||
|
if(node.getAttribute(ta)){
|
||
|
return node.getAttribute(ta);
|
||
|
}else{
|
||
|
if(node.getAttribute(ta.toLowerCase())){
|
||
|
return node.getAttribute(ta.toLowerCase());
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return null;
|
||
|
};
|
||
|
dojo.html.hasAttribute=function(node,attr){
|
||
|
return dojo.html.getAttribute(dojo.byId(node),attr)?true:false;
|
||
|
};
|
||
|
dojo.html.getCursorPosition=function(e){
|
||
|
e=e||dojo.global().event;
|
||
|
var _474={x:0,y:0};
|
||
|
if(e.pageX||e.pageY){
|
||
|
_474.x=e.pageX;
|
||
|
_474.y=e.pageY;
|
||
|
}else{
|
||
|
var de=dojo.doc().documentElement;
|
||
|
var db=dojo.body();
|
||
|
_474.x=e.clientX+((de||db)["scrollLeft"])-((de||db)["clientLeft"]);
|
||
|
_474.y=e.clientY+((de||db)["scrollTop"])-((de||db)["clientTop"]);
|
||
|
}
|
||
|
return _474;
|
||
|
};
|
||
|
dojo.html.isTag=function(node){
|
||
|
node=dojo.byId(node);
|
||
|
if(node&&node.tagName){
|
||
|
for(var i=1;i<arguments.length;i++){
|
||
|
if(node.tagName.toLowerCase()==String(arguments[i]).toLowerCase()){
|
||
|
return String(arguments[i]).toLowerCase();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return "";
|
||
|
};
|
||
|
if(dojo.render.html.ie&&!dojo.render.html.ie70){
|
||
|
if(window.location.href.substr(0,6).toLowerCase()!="https:"){
|
||
|
(function(){
|
||
|
var _479=dojo.doc().createElement("script");
|
||
|
_479.src="javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'";
|
||
|
dojo.doc().getElementsByTagName("head")[0].appendChild(_479);
|
||
|
})();
|
||
|
}
|
||
|
}else{
|
||
|
dojo.html.createExternalElement=function(doc,tag){
|
||
|
return doc.createElement(tag);
|
||
|
};
|
||
|
}
|
||
|
dojo.html._callDeprecated=function(_47c,_47d,args,_47f,_480){
|
||
|
dojo.deprecated("dojo.html."+_47c,"replaced by dojo.html."+_47d+"("+(_47f?"node, {"+_47f+": "+_47f+"}":"")+")"+(_480?"."+_480:""),"0.5");
|
||
|
var _481=[];
|
||
|
if(_47f){
|
||
|
var _482={};
|
||
|
_482[_47f]=args[1];
|
||
|
_481.push(args[0]);
|
||
|
_481.push(_482);
|
||
|
}else{
|
||
|
_481=args;
|
||
|
}
|
||
|
var ret=dojo.html[_47d].apply(dojo.html,args);
|
||
|
if(_480){
|
||
|
return ret[_480];
|
||
|
}else{
|
||
|
return ret;
|
||
|
}
|
||
|
};
|
||
|
dojo.html.getViewportWidth=function(){
|
||
|
return dojo.html._callDeprecated("getViewportWidth","getViewport",arguments,null,"width");
|
||
|
};
|
||
|
dojo.html.getViewportHeight=function(){
|
||
|
return dojo.html._callDeprecated("getViewportHeight","getViewport",arguments,null,"height");
|
||
|
};
|
||
|
dojo.html.getViewportSize=function(){
|
||
|
return dojo.html._callDeprecated("getViewportSize","getViewport",arguments);
|
||
|
};
|
||
|
dojo.html.getScrollTop=function(){
|
||
|
return dojo.html._callDeprecated("getScrollTop","getScroll",arguments,null,"top");
|
||
|
};
|
||
|
dojo.html.getScrollLeft=function(){
|
||
|
return dojo.html._callDeprecated("getScrollLeft","getScroll",arguments,null,"left");
|
||
|
};
|
||
|
dojo.html.getScrollOffset=function(){
|
||
|
return dojo.html._callDeprecated("getScrollOffset","getScroll",arguments,null,"offset");
|
||
|
};
|
||
|
dojo.provide("dojo.a11y");
|
||
|
dojo.a11y={imgPath:dojo.uri.moduleUri("dojo.widget","templates/images"),doAccessibleCheck:true,accessible:null,checkAccessible:function(){
|
||
|
if(this.accessible===null){
|
||
|
this.accessible=false;
|
||
|
if(this.doAccessibleCheck==true){
|
||
|
this.accessible=this.testAccessible();
|
||
|
}
|
||
|
}
|
||
|
return this.accessible;
|
||
|
},testAccessible:function(){
|
||
|
this.accessible=false;
|
||
|
if(dojo.render.html.ie||dojo.render.html.mozilla){
|
||
|
var div=document.createElement("div");
|
||
|
div.style.backgroundImage="url(\""+this.imgPath+"/tab_close.gif\")";
|
||
|
dojo.body().appendChild(div);
|
||
|
var _485=null;
|
||
|
if(window.getComputedStyle){
|
||
|
var _486=getComputedStyle(div,"");
|
||
|
_485=_486.getPropertyValue("background-image");
|
||
|
}else{
|
||
|
_485=div.currentStyle.backgroundImage;
|
||
|
}
|
||
|
var _487=false;
|
||
|
if(_485!=null&&(_485=="none"||_485=="url(invalid-url:)")){
|
||
|
this.accessible=true;
|
||
|
}
|
||
|
dojo.body().removeChild(div);
|
||
|
}
|
||
|
return this.accessible;
|
||
|
},setCheckAccessible:function(_488){
|
||
|
this.doAccessibleCheck=_488;
|
||
|
},setAccessibleMode:function(){
|
||
|
if(this.accessible===null){
|
||
|
if(this.checkAccessible()){
|
||
|
dojo.render.html.prefixes.unshift("a11y");
|
||
|
}
|
||
|
}
|
||
|
return this.accessible;
|
||
|
}};
|
||
|
dojo.provide("dojo.widget.Widget");
|
||
|
dojo.declare("dojo.widget.Widget",null,function(){
|
||
|
this.children=[];
|
||
|
this.extraArgs={};
|
||
|
},{parent:null,isTopLevel:false,disabled:false,isContainer:false,widgetId:"",widgetType:"Widget",ns:"dojo",getNamespacedType:function(){
|
||
|
return (this.ns?this.ns+":"+this.widgetType:this.widgetType).toLowerCase();
|
||
|
},toString:function(){
|
||
|
return "[Widget "+this.getNamespacedType()+", "+(this.widgetId||"NO ID")+"]";
|
||
|
},repr:function(){
|
||
|
return this.toString();
|
||
|
},enable:function(){
|
||
|
this.disabled=false;
|
||
|
},disable:function(){
|
||
|
this.disabled=true;
|
||
|
},onResized:function(){
|
||
|
this.notifyChildrenOfResize();
|
||
|
},notifyChildrenOfResize:function(){
|
||
|
for(var i=0;i<this.children.length;i++){
|
||
|
var _48a=this.children[i];
|
||
|
if(_48a.onResized){
|
||
|
_48a.onResized();
|
||
|
}
|
||
|
}
|
||
|
},create:function(args,_48c,_48d,ns){
|
||
|
if(ns){
|
||
|
this.ns=ns;
|
||
|
}
|
||
|
this.satisfyPropertySets(args,_48c,_48d);
|
||
|
this.mixInProperties(args,_48c,_48d);
|
||
|
this.postMixInProperties(args,_48c,_48d);
|
||
|
dojo.widget.manager.add(this);
|
||
|
this.buildRendering(args,_48c,_48d);
|
||
|
this.initialize(args,_48c,_48d);
|
||
|
this.postInitialize(args,_48c,_48d);
|
||
|
this.postCreate(args,_48c,_48d);
|
||
|
return this;
|
||
|
},destroy:function(_48f){
|
||
|
if(this.parent){
|
||
|
this.parent.removeChild(this);
|
||
|
}
|
||
|
this.destroyChildren();
|
||
|
this.uninitialize();
|
||
|
this.destroyRendering(_48f);
|
||
|
dojo.widget.manager.removeById(this.widgetId);
|
||
|
},destroyChildren:function(){
|
||
|
var _490;
|
||
|
var i=0;
|
||
|
while(this.children.length>i){
|
||
|
_490=this.children[i];
|
||
|
if(_490 instanceof dojo.widget.Widget){
|
||
|
this.removeChild(_490);
|
||
|
_490.destroy();
|
||
|
continue;
|
||
|
}
|
||
|
i++;
|
||
|
}
|
||
|
},getChildrenOfType:function(type,_493){
|
||
|
var ret=[];
|
||
|
var _495=dojo.lang.isFunction(type);
|
||
|
if(!_495){
|
||
|
type=type.toLowerCase();
|
||
|
}
|
||
|
for(var x=0;x<this.children.length;x++){
|
||
|
if(_495){
|
||
|
if(this.children[x] instanceof type){
|
||
|
ret.push(this.children[x]);
|
||
|
}
|
||
|
}else{
|
||
|
if(this.children[x].widgetType.toLowerCase()==type){
|
||
|
ret.push(this.children[x]);
|
||
|
}
|
||
|
}
|
||
|
if(_493){
|
||
|
ret=ret.concat(this.children[x].getChildrenOfType(type,_493));
|
||
|
}
|
||
|
}
|
||
|
return ret;
|
||
|
},getDescendants:function(){
|
||
|
var _497=[];
|
||
|
var _498=[this];
|
||
|
var elem;
|
||
|
while((elem=_498.pop())){
|
||
|
_497.push(elem);
|
||
|
if(elem.children){
|
||
|
dojo.lang.forEach(elem.children,function(elem){
|
||
|
_498.push(elem);
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
return _497;
|
||
|
},isFirstChild:function(){
|
||
|
return this===this.parent.children[0];
|
||
|
},isLastChild:function(){
|
||
|
return this===this.parent.children[this.parent.children.length-1];
|
||
|
},satisfyPropertySets:function(args){
|
||
|
return args;
|
||
|
},mixInProperties:function(args,frag){
|
||
|
if((args["fastMixIn"])||(frag["fastMixIn"])){
|
||
|
for(var x in args){
|
||
|
this[x]=args[x];
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
var _49f;
|
||
|
var _4a0=dojo.widget.lcArgsCache[this.widgetType];
|
||
|
if(_4a0==null){
|
||
|
_4a0={};
|
||
|
for(var y in this){
|
||
|
_4a0[((new String(y)).toLowerCase())]=y;
|
||
|
}
|
||
|
dojo.widget.lcArgsCache[this.widgetType]=_4a0;
|
||
|
}
|
||
|
var _4a2={};
|
||
|
for(var x in args){
|
||
|
if(!this[x]){
|
||
|
var y=_4a0[(new String(x)).toLowerCase()];
|
||
|
if(y){
|
||
|
args[y]=args[x];
|
||
|
x=y;
|
||
|
}
|
||
|
}
|
||
|
if(_4a2[x]){
|
||
|
continue;
|
||
|
}
|
||
|
_4a2[x]=true;
|
||
|
if((typeof this[x])!=(typeof _49f)){
|
||
|
if(typeof args[x]!="string"){
|
||
|
this[x]=args[x];
|
||
|
}else{
|
||
|
if(dojo.lang.isString(this[x])){
|
||
|
this[x]=args[x];
|
||
|
}else{
|
||
|
if(dojo.lang.isNumber(this[x])){
|
||
|
this[x]=new Number(args[x]);
|
||
|
}else{
|
||
|
if(dojo.lang.isBoolean(this[x])){
|
||
|
this[x]=(args[x].toLowerCase()=="false")?false:true;
|
||
|
}else{
|
||
|
if(dojo.lang.isFunction(this[x])){
|
||
|
if(args[x].search(/[^\w\.]+/i)==-1){
|
||
|
this[x]=dojo.evalObjPath(args[x],false);
|
||
|
}else{
|
||
|
var tn=dojo.lang.nameAnonFunc(new Function(args[x]),this);
|
||
|
dojo.event.kwConnect({srcObj:this,srcFunc:x,adviceObj:this,adviceFunc:tn});
|
||
|
}
|
||
|
}else{
|
||
|
if(dojo.lang.isArray(this[x])){
|
||
|
this[x]=args[x].split(";");
|
||
|
}else{
|
||
|
if(this[x] instanceof Date){
|
||
|
this[x]=new Date(Number(args[x]));
|
||
|
}else{
|
||
|
if(typeof this[x]=="object"){
|
||
|
if(this[x] instanceof dojo.uri.Uri){
|
||
|
this[x]=dojo.uri.dojoUri(args[x]);
|
||
|
}else{
|
||
|
var _4a4=args[x].split(";");
|
||
|
for(var y=0;y<_4a4.length;y++){
|
||
|
var si=_4a4[y].indexOf(":");
|
||
|
if((si!=-1)&&(_4a4[y].length>si)){
|
||
|
this[x][_4a4[y].substr(0,si).replace(/^\s+|\s+$/g,"")]=_4a4[y].substr(si+1);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}else{
|
||
|
this[x]=args[x];
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}else{
|
||
|
this.extraArgs[x.toLowerCase()]=args[x];
|
||
|
}
|
||
|
}
|
||
|
},postMixInProperties:function(args,frag,_4a8){
|
||
|
},initialize:function(args,frag,_4ab){
|
||
|
return false;
|
||
|
},postInitialize:function(args,frag,_4ae){
|
||
|
return false;
|
||
|
},postCreate:function(args,frag,_4b1){
|
||
|
return false;
|
||
|
},uninitialize:function(){
|
||
|
return false;
|
||
|
},buildRendering:function(args,frag,_4b4){
|
||
|
dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", ");
|
||
|
return false;
|
||
|
},destroyRendering:function(){
|
||
|
dojo.unimplemented("dojo.widget.Widget.destroyRendering");
|
||
|
return false;
|
||
|
},addedTo:function(_4b5){
|
||
|
},addChild:function(_4b6){
|
||
|
dojo.unimplemented("dojo.widget.Widget.addChild");
|
||
|
return false;
|
||
|
},removeChild:function(_4b7){
|
||
|
for(var x=0;x<this.children.length;x++){
|
||
|
if(this.children[x]===_4b7){
|
||
|
this.children.splice(x,1);
|
||
|
_4b7.parent=null;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
return _4b7;
|
||
|
},getPreviousSibling:function(){
|
||
|
var idx=this.getParentIndex();
|
||
|
if(idx<=0){
|
||
|
return null;
|
||
|
}
|
||
|
return this.parent.children[idx-1];
|
||
|
},getSiblings:function(){
|
||
|
return this.parent.children;
|
||
|
},getParentIndex:function(){
|
||
|
return dojo.lang.indexOf(this.parent.children,this,true);
|
||
|
},getNextSibling:function(){
|
||
|
var idx=this.getParentIndex();
|
||
|
if(idx==this.parent.children.length-1){
|
||
|
return null;
|
||
|
}
|
||
|
if(idx<0){
|
||
|
return null;
|
||
|
}
|
||
|
return this.parent.children[idx+1];
|
||
|
}});
|
||
|
dojo.widget.lcArgsCache={};
|
||
|
dojo.widget.tags={};
|
||
|
dojo.widget.tags.addParseTreeHandler=function(type){
|
||
|
dojo.deprecated("addParseTreeHandler",". ParseTreeHandlers are now reserved for components. Any unfiltered DojoML tag without a ParseTreeHandler is assumed to be a widget","0.5");
|
||
|
};
|
||
|
dojo.widget.tags["dojo:propertyset"]=function(_4bc,_4bd,_4be){
|
||
|
var _4bf=_4bd.parseProperties(_4bc["dojo:propertyset"]);
|
||
|
};
|
||
|
dojo.widget.tags["dojo:connect"]=function(_4c0,_4c1,_4c2){
|
||
|
var _4c3=_4c1.parseProperties(_4c0["dojo:connect"]);
|
||
|
};
|
||
|
dojo.widget.buildWidgetFromParseTree=function(type,frag,_4c6,_4c7,_4c8,_4c9){
|
||
|
dojo.a11y.setAccessibleMode();
|
||
|
var _4ca=type.split(":");
|
||
|
_4ca=(_4ca.length==2)?_4ca[1]:type;
|
||
|
var _4cb=_4c9||_4c6.parseProperties(frag[frag["ns"]+":"+_4ca]);
|
||
|
var _4cc=dojo.widget.manager.getImplementation(_4ca,null,null,frag["ns"]);
|
||
|
if(!_4cc){
|
||
|
throw new Error("cannot find \""+type+"\" widget");
|
||
|
}else{
|
||
|
if(!_4cc.create){
|
||
|
throw new Error("\""+type+"\" widget object has no \"create\" method and does not appear to implement *Widget");
|
||
|
}
|
||
|
}
|
||
|
_4cb["dojoinsertionindex"]=_4c8;
|
||
|
var ret=_4cc.create(_4cb,frag,_4c7,frag["ns"]);
|
||
|
return ret;
|
||
|
};
|
||
|
dojo.widget.defineWidget=function(_4ce,_4cf,_4d0,init,_4d2){
|
||
|
if(dojo.lang.isString(arguments[3])){
|
||
|
dojo.widget._defineWidget(arguments[0],arguments[3],arguments[1],arguments[4],arguments[2]);
|
||
|
}else{
|
||
|
var args=[arguments[0]],p=3;
|
||
|
if(dojo.lang.isString(arguments[1])){
|
||
|
args.push(arguments[1],arguments[2]);
|
||
|
}else{
|
||
|
args.push("",arguments[1]);
|
||
|
p=2;
|
||
|
}
|
||
|
if(dojo.lang.isFunction(arguments[p])){
|
||
|
args.push(arguments[p],arguments[p+1]);
|
||
|
}else{
|
||
|
args.push(null,arguments[p]);
|
||
|
}
|
||
|
dojo.widget._defineWidget.apply(this,args);
|
||
|
}
|
||
|
};
|
||
|
dojo.widget.defineWidget.renderers="html|svg|vml";
|
||
|
dojo.widget._defineWidget=function(_4d5,_4d6,_4d7,init,_4d9){
|
||
|
var _4da=_4d5.split(".");
|
||
|
var type=_4da.pop();
|
||
|
var regx="\\.("+(_4d6?_4d6+"|":"")+dojo.widget.defineWidget.renderers+")\\.";
|
||
|
var r=_4d5.search(new RegExp(regx));
|
||
|
_4da=(r<0?_4da.join("."):_4d5.substr(0,r));
|
||
|
dojo.widget.manager.registerWidgetPackage(_4da);
|
||
|
var pos=_4da.indexOf(".");
|
||
|
var _4df=(pos>-1)?_4da.substring(0,pos):_4da;
|
||
|
_4d9=(_4d9)||{};
|
||
|
_4d9.widgetType=type;
|
||
|
if((!init)&&(_4d9["classConstructor"])){
|
||
|
init=_4d9.classConstructor;
|
||
|
delete _4d9.classConstructor;
|
||
|
}
|
||
|
dojo.declare(_4d5,_4d7,init,_4d9);
|
||
|
};
|
||
|
dojo.provide("dojo.widget.Parse");
|
||
|
dojo.widget.Parse=function(_4e0){
|
||
|
this.propertySetsList=[];
|
||
|
this.fragment=_4e0;
|
||
|
this.createComponents=function(frag,_4e2){
|
||
|
var _4e3=[];
|
||
|
var _4e4=false;
|
||
|
try{
|
||
|
if(frag&&frag.tagName&&(frag!=frag.nodeRef)){
|
||
|
var _4e5=dojo.widget.tags;
|
||
|
var tna=String(frag.tagName).split(";");
|
||
|
for(var x=0;x<tna.length;x++){
|
||
|
var ltn=tna[x].replace(/^\s+|\s+$/g,"").toLowerCase();
|
||
|
frag.tagName=ltn;
|
||
|
var ret;
|
||
|
if(_4e5[ltn]){
|
||
|
_4e4=true;
|
||
|
ret=_4e5[ltn](frag,this,_4e2,frag.index);
|
||
|
_4e3.push(ret);
|
||
|
}else{
|
||
|
if(ltn.indexOf(":")==-1){
|
||
|
ltn="dojo:"+ltn;
|
||
|
}
|
||
|
ret=dojo.widget.buildWidgetFromParseTree(ltn,frag,this,_4e2,frag.index);
|
||
|
if(ret){
|
||
|
_4e4=true;
|
||
|
_4e3.push(ret);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug("dojo.widget.Parse: error:",e);
|
||
|
}
|
||
|
if(!_4e4){
|
||
|
_4e3=_4e3.concat(this.createSubComponents(frag,_4e2));
|
||
|
}
|
||
|
return _4e3;
|
||
|
};
|
||
|
this.createSubComponents=function(_4ea,_4eb){
|
||
|
var frag,_4ed=[];
|
||
|
for(var item in _4ea){
|
||
|
frag=_4ea[item];
|
||
|
if(frag&&typeof frag=="object"&&(frag!=_4ea.nodeRef)&&(frag!=_4ea.tagName)&&(!dojo.dom.isNode(frag))){
|
||
|
_4ed=_4ed.concat(this.createComponents(frag,_4eb));
|
||
|
}
|
||
|
}
|
||
|
return _4ed;
|
||
|
};
|
||
|
this.parsePropertySets=function(_4ef){
|
||
|
return [];
|
||
|
};
|
||
|
this.parseProperties=function(_4f0){
|
||
|
var _4f1={};
|
||
|
for(var item in _4f0){
|
||
|
if((_4f0[item]==_4f0.tagName)||(_4f0[item]==_4f0.nodeRef)){
|
||
|
}else{
|
||
|
var frag=_4f0[item];
|
||
|
if(frag.tagName&&dojo.widget.tags[frag.tagName.toLowerCase()]){
|
||
|
}else{
|
||
|
if(frag[0]&&frag[0].value!=""&&frag[0].value!=null){
|
||
|
try{
|
||
|
if(item.toLowerCase()=="dataprovider"){
|
||
|
var _4f4=this;
|
||
|
this.getDataProvider(_4f4,frag[0].value);
|
||
|
_4f1.dataProvider=this.dataProvider;
|
||
|
}
|
||
|
_4f1[item]=frag[0].value;
|
||
|
var _4f5=this.parseProperties(frag);
|
||
|
for(var _4f6 in _4f5){
|
||
|
_4f1[_4f6]=_4f5[_4f6];
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug(e);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
switch(item.toLowerCase()){
|
||
|
case "checked":
|
||
|
case "disabled":
|
||
|
if(typeof _4f1[item]!="boolean"){
|
||
|
_4f1[item]=true;
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return _4f1;
|
||
|
};
|
||
|
this.getDataProvider=function(_4f7,_4f8){
|
||
|
dojo.io.bind({url:_4f8,load:function(type,_4fa){
|
||
|
if(type=="load"){
|
||
|
_4f7.dataProvider=_4fa;
|
||
|
}
|
||
|
},mimetype:"text/javascript",sync:true});
|
||
|
};
|
||
|
this.getPropertySetById=function(_4fb){
|
||
|
for(var x=0;x<this.propertySetsList.length;x++){
|
||
|
if(_4fb==this.propertySetsList[x]["id"][0].value){
|
||
|
return this.propertySetsList[x];
|
||
|
}
|
||
|
}
|
||
|
return "";
|
||
|
};
|
||
|
this.getPropertySetsByType=function(_4fd){
|
||
|
var _4fe=[];
|
||
|
for(var x=0;x<this.propertySetsList.length;x++){
|
||
|
var cpl=this.propertySetsList[x];
|
||
|
var cpcc=cpl.componentClass||cpl.componentType||null;
|
||
|
var _502=this.propertySetsList[x]["id"][0].value;
|
||
|
if(cpcc&&(_502==cpcc[0].value)){
|
||
|
_4fe.push(cpl);
|
||
|
}
|
||
|
}
|
||
|
return _4fe;
|
||
|
};
|
||
|
this.getPropertySets=function(_503){
|
||
|
var ppl="dojo:propertyproviderlist";
|
||
|
var _505=[];
|
||
|
var _506=_503.tagName;
|
||
|
if(_503[ppl]){
|
||
|
var _507=_503[ppl].value.split(" ");
|
||
|
for(var _508 in _507){
|
||
|
if((_508.indexOf("..")==-1)&&(_508.indexOf("://")==-1)){
|
||
|
var _509=this.getPropertySetById(_508);
|
||
|
if(_509!=""){
|
||
|
_505.push(_509);
|
||
|
}
|
||
|
}else{
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return this.getPropertySetsByType(_506).concat(_505);
|
||
|
};
|
||
|
this.createComponentFromScript=function(_50a,_50b,_50c,ns){
|
||
|
_50c.fastMixIn=true;
|
||
|
var ltn=(ns||"dojo")+":"+_50b.toLowerCase();
|
||
|
if(dojo.widget.tags[ltn]){
|
||
|
return [dojo.widget.tags[ltn](_50c,this,null,null,_50c)];
|
||
|
}
|
||
|
return [dojo.widget.buildWidgetFromParseTree(ltn,_50c,this,null,null,_50c)];
|
||
|
};
|
||
|
};
|
||
|
dojo.widget._parser_collection={"dojo":new dojo.widget.Parse()};
|
||
|
dojo.widget.getParser=function(name){
|
||
|
if(!name){
|
||
|
name="dojo";
|
||
|
}
|
||
|
if(!this._parser_collection[name]){
|
||
|
this._parser_collection[name]=new dojo.widget.Parse();
|
||
|
}
|
||
|
return this._parser_collection[name];
|
||
|
};
|
||
|
dojo.widget.createWidget=function(name,_511,_512,_513){
|
||
|
var _514=false;
|
||
|
var _515=(typeof name=="string");
|
||
|
if(_515){
|
||
|
var pos=name.indexOf(":");
|
||
|
var ns=(pos>-1)?name.substring(0,pos):"dojo";
|
||
|
if(pos>-1){
|
||
|
name=name.substring(pos+1);
|
||
|
}
|
||
|
var _518=name.toLowerCase();
|
||
|
var _519=ns+":"+_518;
|
||
|
_514=(dojo.byId(name)&&!dojo.widget.tags[_519]);
|
||
|
}
|
||
|
if((arguments.length==1)&&(_514||!_515)){
|
||
|
var xp=new dojo.xml.Parse();
|
||
|
var tn=_514?dojo.byId(name):name;
|
||
|
return dojo.widget.getParser().createComponents(xp.parseElement(tn,null,true))[0];
|
||
|
}
|
||
|
function fromScript(_51c,name,_51e,ns){
|
||
|
_51e[_519]={dojotype:[{value:_518}],nodeRef:_51c,fastMixIn:true};
|
||
|
_51e.ns=ns;
|
||
|
return dojo.widget.getParser().createComponentFromScript(_51c,name,_51e,ns);
|
||
|
}
|
||
|
_511=_511||{};
|
||
|
var _520=false;
|
||
|
var tn=null;
|
||
|
var h=dojo.render.html.capable;
|
||
|
if(h){
|
||
|
tn=document.createElement("span");
|
||
|
}
|
||
|
if(!_512){
|
||
|
_520=true;
|
||
|
_512=tn;
|
||
|
if(h){
|
||
|
dojo.body().appendChild(_512);
|
||
|
}
|
||
|
}else{
|
||
|
if(_513){
|
||
|
dojo.dom.insertAtPosition(tn,_512,_513);
|
||
|
}else{
|
||
|
tn=_512;
|
||
|
}
|
||
|
}
|
||
|
var _522=fromScript(tn,name.toLowerCase(),_511,ns);
|
||
|
if((!_522)||(!_522[0])||(typeof _522[0].widgetType=="undefined")){
|
||
|
throw new Error("createWidget: Creation of \""+name+"\" widget failed.");
|
||
|
}
|
||
|
try{
|
||
|
if(_520&&_522[0].domNode.parentNode){
|
||
|
_522[0].domNode.parentNode.removeChild(_522[0].domNode);
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug(e);
|
||
|
}
|
||
|
return _522[0];
|
||
|
};
|
||
|
dojo.provide("dojo.html.style");
|
||
|
dojo.html.getClass=function(node){
|
||
|
node=dojo.byId(node);
|
||
|
if(!node){
|
||
|
return "";
|
||
|
}
|
||
|
var cs="";
|
||
|
if(node.className){
|
||
|
cs=node.className;
|
||
|
}else{
|
||
|
if(dojo.html.hasAttribute(node,"class")){
|
||
|
cs=dojo.html.getAttribute(node,"class");
|
||
|
}
|
||
|
}
|
||
|
return cs.replace(/^\s+|\s+$/g,"");
|
||
|
};
|
||
|
dojo.html.getClasses=function(node){
|
||
|
var c=dojo.html.getClass(node);
|
||
|
return (c=="")?[]:c.split(/\s+/g);
|
||
|
};
|
||
|
dojo.html.hasClass=function(node,_528){
|
||
|
return (new RegExp("(^|\\s+)"+_528+"(\\s+|$)")).test(dojo.html.getClass(node));
|
||
|
};
|
||
|
dojo.html.prependClass=function(node,_52a){
|
||
|
_52a+=" "+dojo.html.getClass(node);
|
||
|
return dojo.html.setClass(node,_52a);
|
||
|
};
|
||
|
dojo.html.addClass=function(node,_52c){
|
||
|
if(dojo.html.hasClass(node,_52c)){
|
||
|
return false;
|
||
|
}
|
||
|
_52c=(dojo.html.getClass(node)+" "+_52c).replace(/^\s+|\s+$/g,"");
|
||
|
return dojo.html.setClass(node,_52c);
|
||
|
};
|
||
|
dojo.html.setClass=function(node,_52e){
|
||
|
node=dojo.byId(node);
|
||
|
var cs=new String(_52e);
|
||
|
try{
|
||
|
if(typeof node.className=="string"){
|
||
|
node.className=cs;
|
||
|
}else{
|
||
|
if(node.setAttribute){
|
||
|
node.setAttribute("class",_52e);
|
||
|
node.className=cs;
|
||
|
}else{
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug("dojo.html.setClass() failed",e);
|
||
|
}
|
||
|
return true;
|
||
|
};
|
||
|
dojo.html.removeClass=function(node,_531,_532){
|
||
|
try{
|
||
|
if(!_532){
|
||
|
var _533=dojo.html.getClass(node).replace(new RegExp("(^|\\s+)"+_531+"(\\s+|$)"),"$1$2");
|
||
|
}else{
|
||
|
var _533=dojo.html.getClass(node).replace(_531,"");
|
||
|
}
|
||
|
dojo.html.setClass(node,_533);
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug("dojo.html.removeClass() failed",e);
|
||
|
}
|
||
|
return true;
|
||
|
};
|
||
|
dojo.html.replaceClass=function(node,_535,_536){
|
||
|
dojo.html.removeClass(node,_536);
|
||
|
dojo.html.addClass(node,_535);
|
||
|
};
|
||
|
dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2};
|
||
|
dojo.html.getElementsByClass=function(_537,_538,_539,_53a,_53b){
|
||
|
_53b=false;
|
||
|
var _53c=dojo.doc();
|
||
|
_538=dojo.byId(_538)||_53c;
|
||
|
var _53d=_537.split(/\s+/g);
|
||
|
var _53e=[];
|
||
|
if(_53a!=1&&_53a!=2){
|
||
|
_53a=0;
|
||
|
}
|
||
|
var _53f=new RegExp("(\\s|^)(("+_53d.join(")|(")+"))(\\s|$)");
|
||
|
var _540=_53d.join(" ").length;
|
||
|
var _541=[];
|
||
|
if(!_53b&&_53c.evaluate){
|
||
|
var _542=".//"+(_539||"*")+"[contains(";
|
||
|
if(_53a!=dojo.html.classMatchType.ContainsAny){
|
||
|
_542+="concat(' ',@class,' '), ' "+_53d.join(" ') and contains(concat(' ',@class,' '), ' ")+" ')";
|
||
|
if(_53a==2){
|
||
|
_542+=" and string-length(@class)="+_540+"]";
|
||
|
}else{
|
||
|
_542+="]";
|
||
|
}
|
||
|
}else{
|
||
|
_542+="concat(' ',@class,' '), ' "+_53d.join(" ') or contains(concat(' ',@class,' '), ' ")+" ')]";
|
||
|
}
|
||
|
var _543=_53c.evaluate(_542,_538,null,XPathResult.ANY_TYPE,null);
|
||
|
var _544=_543.iterateNext();
|
||
|
while(_544){
|
||
|
try{
|
||
|
_541.push(_544);
|
||
|
_544=_543.iterateNext();
|
||
|
}
|
||
|
catch(e){
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
return _541;
|
||
|
}else{
|
||
|
if(!_539){
|
||
|
_539="*";
|
||
|
}
|
||
|
_541=_538.getElementsByTagName(_539);
|
||
|
var node,i=0;
|
||
|
outer:
|
||
|
while(node=_541[i++]){
|
||
|
var _547=dojo.html.getClasses(node);
|
||
|
if(_547.length==0){
|
||
|
continue outer;
|
||
|
}
|
||
|
var _548=0;
|
||
|
for(var j=0;j<_547.length;j++){
|
||
|
if(_53f.test(_547[j])){
|
||
|
if(_53a==dojo.html.classMatchType.ContainsAny){
|
||
|
_53e.push(node);
|
||
|
continue outer;
|
||
|
}else{
|
||
|
_548++;
|
||
|
}
|
||
|
}else{
|
||
|
if(_53a==dojo.html.classMatchType.IsOnly){
|
||
|
continue outer;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(_548==_53d.length){
|
||
|
if((_53a==dojo.html.classMatchType.IsOnly)&&(_548==_547.length)){
|
||
|
_53e.push(node);
|
||
|
}else{
|
||
|
if(_53a==dojo.html.classMatchType.ContainsAll){
|
||
|
_53e.push(node);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return _53e;
|
||
|
}
|
||
|
};
|
||
|
dojo.html.getElementsByClassName=dojo.html.getElementsByClass;
|
||
|
dojo.html.toCamelCase=function(_54a){
|
||
|
var arr=_54a.split("-"),cc=arr[0];
|
||
|
for(var i=1;i<arr.length;i++){
|
||
|
cc+=arr[i].charAt(0).toUpperCase()+arr[i].substring(1);
|
||
|
}
|
||
|
return cc;
|
||
|
};
|
||
|
dojo.html.toSelectorCase=function(_54e){
|
||
|
return _54e.replace(/([A-Z])/g,"-$1").toLowerCase();
|
||
|
};
|
||
|
if(dojo.render.html.ie){
|
||
|
dojo.html.getComputedStyle=function(node,_550,_551){
|
||
|
node=dojo.byId(node);
|
||
|
if(!node||!node.currentStyle){
|
||
|
return _551;
|
||
|
}
|
||
|
return node.currentStyle[dojo.html.toCamelCase(_550)];
|
||
|
};
|
||
|
dojo.html.getComputedStyles=function(node){
|
||
|
return node.currentStyle;
|
||
|
};
|
||
|
}else{
|
||
|
dojo.html.getComputedStyle=function(node,_554,_555){
|
||
|
node=dojo.byId(node);
|
||
|
if(!node||!node.style){
|
||
|
return _555;
|
||
|
}
|
||
|
var s=document.defaultView.getComputedStyle(node,null);
|
||
|
return (s&&s[dojo.html.toCamelCase(_554)])||"";
|
||
|
};
|
||
|
dojo.html.getComputedStyles=function(node){
|
||
|
return document.defaultView.getComputedStyle(node,null);
|
||
|
};
|
||
|
}
|
||
|
dojo.html.getStyleProperty=function(node,_559){
|
||
|
node=dojo.byId(node);
|
||
|
return (node&&node.style?node.style[dojo.html.toCamelCase(_559)]:undefined);
|
||
|
};
|
||
|
dojo.html.getStyle=function(node,_55b){
|
||
|
var _55c=dojo.html.getStyleProperty(node,_55b);
|
||
|
return (_55c?_55c:dojo.html.getComputedStyle(node,_55b));
|
||
|
};
|
||
|
dojo.html.setStyle=function(node,_55e,_55f){
|
||
|
node=dojo.byId(node);
|
||
|
if(node&&node.style){
|
||
|
var _560=dojo.html.toCamelCase(_55e);
|
||
|
node.style[_560]=_55f;
|
||
|
}
|
||
|
};
|
||
|
dojo.html.setStyleText=function(_561,text){
|
||
|
try{
|
||
|
_561.style.cssText=text;
|
||
|
}
|
||
|
catch(e){
|
||
|
_561.setAttribute("style",text);
|
||
|
}
|
||
|
};
|
||
|
dojo.html.copyStyle=function(_563,_564){
|
||
|
if(!_564.style.cssText){
|
||
|
_563.setAttribute("style",_564.getAttribute("style"));
|
||
|
}else{
|
||
|
_563.style.cssText=_564.style.cssText;
|
||
|
}
|
||
|
dojo.html.addClass(_563,dojo.html.getClass(_564));
|
||
|
};
|
||
|
dojo.html.getUnitValue=function(node,_566,_567){
|
||
|
var s=dojo.html.getComputedStyle(node,_566);
|
||
|
if((!s)||((s=="auto")&&(_567))){
|
||
|
return {value:0,units:"px"};
|
||
|
}
|
||
|
var _569=s.match(/(\-?[\d.]+)([a-z%]*)/i);
|
||
|
if(!_569){
|
||
|
return dojo.html.getUnitValue.bad;
|
||
|
}
|
||
|
return {value:Number(_569[1]),units:_569[2].toLowerCase()};
|
||
|
};
|
||
|
dojo.html.getUnitValue.bad={value:NaN,units:""};
|
||
|
if(dojo.render.html.ie){
|
||
|
dojo.html.toPixelValue=function(_56a,_56b){
|
||
|
if(!_56b){
|
||
|
return 0;
|
||
|
}
|
||
|
if(_56b.slice(-2)=="px"){
|
||
|
return parseFloat(_56b);
|
||
|
}
|
||
|
var _56c=0;
|
||
|
with(_56a){
|
||
|
var _56d=style.left;
|
||
|
var _56e=runtimeStyle.left;
|
||
|
runtimeStyle.left=currentStyle.left;
|
||
|
try{
|
||
|
style.left=_56b||0;
|
||
|
_56c=style.pixelLeft;
|
||
|
style.left=_56d;
|
||
|
runtimeStyle.left=_56e;
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
}
|
||
|
return _56c;
|
||
|
};
|
||
|
}else{
|
||
|
dojo.html.toPixelValue=function(_56f,_570){
|
||
|
return (_570&&(_570.slice(-2)=="px")?parseFloat(_570):0);
|
||
|
};
|
||
|
}
|
||
|
dojo.html.getPixelValue=function(node,_572,_573){
|
||
|
return dojo.html.toPixelValue(node,dojo.html.getComputedStyle(node,_572));
|
||
|
};
|
||
|
dojo.html.setPositivePixelValue=function(node,_575,_576){
|
||
|
if(isNaN(_576)){
|
||
|
return false;
|
||
|
}
|
||
|
node.style[_575]=Math.max(0,_576)+"px";
|
||
|
return true;
|
||
|
};
|
||
|
dojo.html.styleSheet=null;
|
||
|
dojo.html.insertCssRule=function(_577,_578,_579){
|
||
|
if(!dojo.html.styleSheet){
|
||
|
if(document.createStyleSheet){
|
||
|
dojo.html.styleSheet=document.createStyleSheet();
|
||
|
}else{
|
||
|
if(document.styleSheets[0]){
|
||
|
dojo.html.styleSheet=document.styleSheets[0];
|
||
|
}else{
|
||
|
return null;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(arguments.length<3){
|
||
|
if(dojo.html.styleSheet.cssRules){
|
||
|
_579=dojo.html.styleSheet.cssRules.length;
|
||
|
}else{
|
||
|
if(dojo.html.styleSheet.rules){
|
||
|
_579=dojo.html.styleSheet.rules.length;
|
||
|
}else{
|
||
|
return null;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(dojo.html.styleSheet.insertRule){
|
||
|
var rule=_577+" { "+_578+" }";
|
||
|
return dojo.html.styleSheet.insertRule(rule,_579);
|
||
|
}else{
|
||
|
if(dojo.html.styleSheet.addRule){
|
||
|
return dojo.html.styleSheet.addRule(_577,_578,_579);
|
||
|
}else{
|
||
|
return null;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.html.removeCssRule=function(_57b){
|
||
|
if(!dojo.html.styleSheet){
|
||
|
dojo.debug("no stylesheet defined for removing rules");
|
||
|
return false;
|
||
|
}
|
||
|
if(dojo.render.html.ie){
|
||
|
if(!_57b){
|
||
|
_57b=dojo.html.styleSheet.rules.length;
|
||
|
dojo.html.styleSheet.removeRule(_57b);
|
||
|
}
|
||
|
}else{
|
||
|
if(document.styleSheets[0]){
|
||
|
if(!_57b){
|
||
|
_57b=dojo.html.styleSheet.cssRules.length;
|
||
|
}
|
||
|
dojo.html.styleSheet.deleteRule(_57b);
|
||
|
}
|
||
|
}
|
||
|
return true;
|
||
|
};
|
||
|
dojo.html._insertedCssFiles=[];
|
||
|
dojo.html.insertCssFile=function(URI,doc,_57e,_57f){
|
||
|
if(!URI){
|
||
|
return;
|
||
|
}
|
||
|
if(!doc){
|
||
|
doc=document;
|
||
|
}
|
||
|
var _580=dojo.hostenv.getText(URI,false,_57f);
|
||
|
if(_580===null){
|
||
|
return;
|
||
|
}
|
||
|
_580=dojo.html.fixPathsInCssText(_580,URI);
|
||
|
if(_57e){
|
||
|
var idx=-1,node,ent=dojo.html._insertedCssFiles;
|
||
|
for(var i=0;i<ent.length;i++){
|
||
|
if((ent[i].doc==doc)&&(ent[i].cssText==_580)){
|
||
|
idx=i;
|
||
|
node=ent[i].nodeRef;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
if(node){
|
||
|
var _585=doc.getElementsByTagName("style");
|
||
|
for(var i=0;i<_585.length;i++){
|
||
|
if(_585[i]==node){
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
dojo.html._insertedCssFiles.shift(idx,1);
|
||
|
}
|
||
|
}
|
||
|
var _586=dojo.html.insertCssText(_580,doc);
|
||
|
dojo.html._insertedCssFiles.push({"doc":doc,"cssText":_580,"nodeRef":_586});
|
||
|
if(_586&&djConfig.isDebug){
|
||
|
_586.setAttribute("dbgHref",URI);
|
||
|
}
|
||
|
return _586;
|
||
|
};
|
||
|
dojo.html.insertCssText=function(_587,doc,URI){
|
||
|
if(!_587){
|
||
|
return;
|
||
|
}
|
||
|
if(!doc){
|
||
|
doc=document;
|
||
|
}
|
||
|
if(URI){
|
||
|
_587=dojo.html.fixPathsInCssText(_587,URI);
|
||
|
}
|
||
|
var _58a=doc.createElement("style");
|
||
|
_58a.setAttribute("type","text/css");
|
||
|
var head=doc.getElementsByTagName("head")[0];
|
||
|
if(!head){
|
||
|
dojo.debug("No head tag in document, aborting styles");
|
||
|
return;
|
||
|
}else{
|
||
|
head.appendChild(_58a);
|
||
|
}
|
||
|
if(_58a.styleSheet){
|
||
|
var _58c=function(){
|
||
|
try{
|
||
|
_58a.styleSheet.cssText=_587;
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug(e);
|
||
|
}
|
||
|
};
|
||
|
if(_58a.styleSheet.disabled){
|
||
|
setTimeout(_58c,10);
|
||
|
}else{
|
||
|
_58c();
|
||
|
}
|
||
|
}else{
|
||
|
var _58d=doc.createTextNode(_587);
|
||
|
_58a.appendChild(_58d);
|
||
|
}
|
||
|
return _58a;
|
||
|
};
|
||
|
dojo.html.fixPathsInCssText=function(_58e,URI){
|
||
|
if(!_58e||!URI){
|
||
|
return;
|
||
|
}
|
||
|
var _590,str="",url="",_593="[\\t\\s\\w\\(\\)\\/\\.\\\\'\"-:#=&?~]+";
|
||
|
var _594=new RegExp("url\\(\\s*("+_593+")\\s*\\)");
|
||
|
var _595=/(file|https?|ftps?):\/\//;
|
||
|
regexTrim=new RegExp("^[\\s]*(['\"]?)("+_593+")\\1[\\s]*?$");
|
||
|
if(dojo.render.html.ie55||dojo.render.html.ie60){
|
||
|
var _596=new RegExp("AlphaImageLoader\\((.*)src=['\"]("+_593+")['\"]");
|
||
|
while(_590=_596.exec(_58e)){
|
||
|
url=_590[2].replace(regexTrim,"$2");
|
||
|
if(!_595.exec(url)){
|
||
|
url=(new dojo.uri.Uri(URI,url).toString());
|
||
|
}
|
||
|
str+=_58e.substring(0,_590.index)+"AlphaImageLoader("+_590[1]+"src='"+url+"'";
|
||
|
_58e=_58e.substr(_590.index+_590[0].length);
|
||
|
}
|
||
|
_58e=str+_58e;
|
||
|
str="";
|
||
|
}
|
||
|
while(_590=_594.exec(_58e)){
|
||
|
url=_590[1].replace(regexTrim,"$2");
|
||
|
if(!_595.exec(url)){
|
||
|
url=(new dojo.uri.Uri(URI,url).toString());
|
||
|
}
|
||
|
str+=_58e.substring(0,_590.index)+"url("+url+")";
|
||
|
_58e=_58e.substr(_590.index+_590[0].length);
|
||
|
}
|
||
|
return str+_58e;
|
||
|
};
|
||
|
dojo.html.setActiveStyleSheet=function(_597){
|
||
|
var i=0,a,els=dojo.doc().getElementsByTagName("link");
|
||
|
while(a=els[i++]){
|
||
|
if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")){
|
||
|
a.disabled=true;
|
||
|
if(a.getAttribute("title")==_597){
|
||
|
a.disabled=false;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.html.getActiveStyleSheet=function(){
|
||
|
var i=0,a,els=dojo.doc().getElementsByTagName("link");
|
||
|
while(a=els[i++]){
|
||
|
if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")&&!a.disabled){
|
||
|
return a.getAttribute("title");
|
||
|
}
|
||
|
}
|
||
|
return null;
|
||
|
};
|
||
|
dojo.html.getPreferredStyleSheet=function(){
|
||
|
var i=0,a,els=dojo.doc().getElementsByTagName("link");
|
||
|
while(a=els[i++]){
|
||
|
if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("rel").indexOf("alt")==-1&&a.getAttribute("title")){
|
||
|
return a.getAttribute("title");
|
||
|
}
|
||
|
}
|
||
|
return null;
|
||
|
};
|
||
|
dojo.html.applyBrowserClass=function(node){
|
||
|
var drh=dojo.render.html;
|
||
|
var _5a3={dj_ie:drh.ie,dj_ie55:drh.ie55,dj_ie6:drh.ie60,dj_ie7:drh.ie70,dj_iequirks:drh.ie&&drh.quirks,dj_opera:drh.opera,dj_opera8:drh.opera&&(Math.floor(dojo.render.version)==8),dj_opera9:drh.opera&&(Math.floor(dojo.render.version)==9),dj_khtml:drh.khtml,dj_safari:drh.safari,dj_gecko:drh.mozilla};
|
||
|
for(var p in _5a3){
|
||
|
if(_5a3[p]){
|
||
|
dojo.html.addClass(node,p);
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.provide("dojo.widget.DomWidget");
|
||
|
dojo.widget._cssFiles={};
|
||
|
dojo.widget._cssStrings={};
|
||
|
dojo.widget._templateCache={};
|
||
|
dojo.widget.defaultStrings={dojoRoot:dojo.hostenv.getBaseScriptUri(),dojoWidgetModuleUri:dojo.uri.moduleUri("dojo.widget"),baseScriptUri:dojo.hostenv.getBaseScriptUri()};
|
||
|
dojo.widget.fillFromTemplateCache=function(obj,_5a6,_5a7,_5a8){
|
||
|
var _5a9=_5a6||obj.templatePath;
|
||
|
var _5aa=dojo.widget._templateCache;
|
||
|
if(!_5a9&&!obj["widgetType"]){
|
||
|
do{
|
||
|
var _5ab="__dummyTemplate__"+dojo.widget._templateCache.dummyCount++;
|
||
|
}while(_5aa[_5ab]);
|
||
|
obj.widgetType=_5ab;
|
||
|
}
|
||
|
var wt=_5a9?_5a9.toString():obj.widgetType;
|
||
|
var ts=_5aa[wt];
|
||
|
if(!ts){
|
||
|
_5aa[wt]={"string":null,"node":null};
|
||
|
if(_5a8){
|
||
|
ts={};
|
||
|
}else{
|
||
|
ts=_5aa[wt];
|
||
|
}
|
||
|
}
|
||
|
if((!obj.templateString)&&(!_5a8)){
|
||
|
obj.templateString=_5a7||ts["string"];
|
||
|
}
|
||
|
if(obj.templateString){
|
||
|
obj.templateString=this._sanitizeTemplateString(obj.templateString);
|
||
|
}
|
||
|
if((!obj.templateNode)&&(!_5a8)){
|
||
|
obj.templateNode=ts["node"];
|
||
|
}
|
||
|
if((!obj.templateNode)&&(!obj.templateString)&&(_5a9)){
|
||
|
var _5ae=this._sanitizeTemplateString(dojo.hostenv.getText(_5a9));
|
||
|
obj.templateString=_5ae;
|
||
|
if(!_5a8){
|
||
|
_5aa[wt]["string"]=_5ae;
|
||
|
}
|
||
|
}
|
||
|
if((!ts["string"])&&(!_5a8)){
|
||
|
ts.string=obj.templateString;
|
||
|
}
|
||
|
};
|
||
|
dojo.widget._sanitizeTemplateString=function(_5af){
|
||
|
if(_5af){
|
||
|
_5af=_5af.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
|
||
|
var _5b0=_5af.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
|
||
|
if(_5b0){
|
||
|
_5af=_5b0[1];
|
||
|
}
|
||
|
}else{
|
||
|
_5af="";
|
||
|
}
|
||
|
return _5af;
|
||
|
};
|
||
|
dojo.widget._templateCache.dummyCount=0;
|
||
|
dojo.widget.attachProperties=["dojoAttachPoint","id"];
|
||
|
dojo.widget.eventAttachProperty="dojoAttachEvent";
|
||
|
dojo.widget.onBuildProperty="dojoOnBuild";
|
||
|
dojo.widget.waiNames=["waiRole","waiState"];
|
||
|
dojo.widget.wai={waiRole:{name:"waiRole","namespace":"http://www.w3.org/TR/xhtml2",alias:"x2",prefix:"wairole:"},waiState:{name:"waiState","namespace":"http://www.w3.org/2005/07/aaa",alias:"aaa",prefix:""},setAttr:function(node,ns,attr,_5b4){
|
||
|
if(dojo.render.html.ie){
|
||
|
node.setAttribute(this[ns].alias+":"+attr,this[ns].prefix+_5b4);
|
||
|
}else{
|
||
|
node.setAttributeNS(this[ns]["namespace"],attr,this[ns].prefix+_5b4);
|
||
|
}
|
||
|
},getAttr:function(node,ns,attr){
|
||
|
if(dojo.render.html.ie){
|
||
|
return node.getAttribute(this[ns].alias+":"+attr);
|
||
|
}else{
|
||
|
return node.getAttributeNS(this[ns]["namespace"],attr);
|
||
|
}
|
||
|
},removeAttr:function(node,ns,attr){
|
||
|
var _5bb=true;
|
||
|
if(dojo.render.html.ie){
|
||
|
_5bb=node.removeAttribute(this[ns].alias+":"+attr);
|
||
|
}else{
|
||
|
node.removeAttributeNS(this[ns]["namespace"],attr);
|
||
|
}
|
||
|
return _5bb;
|
||
|
}};
|
||
|
dojo.widget.attachTemplateNodes=function(_5bc,_5bd,_5be){
|
||
|
var _5bf=dojo.dom.ELEMENT_NODE;
|
||
|
function trim(str){
|
||
|
return str.replace(/^\s+|\s+$/g,"");
|
||
|
}
|
||
|
if(!_5bc){
|
||
|
_5bc=_5bd.domNode;
|
||
|
}
|
||
|
if(_5bc.nodeType!=_5bf){
|
||
|
return;
|
||
|
}
|
||
|
var _5c1=_5bc.all||_5bc.getElementsByTagName("*");
|
||
|
var _5c2=_5bd;
|
||
|
for(var x=-1;x<_5c1.length;x++){
|
||
|
var _5c4=(x==-1)?_5bc:_5c1[x];
|
||
|
var _5c5=[];
|
||
|
if(!_5bd.widgetsInTemplate||!_5c4.getAttribute("dojoType")){
|
||
|
for(var y=0;y<this.attachProperties.length;y++){
|
||
|
var _5c7=_5c4.getAttribute(this.attachProperties[y]);
|
||
|
if(_5c7){
|
||
|
_5c5=_5c7.split(";");
|
||
|
for(var z=0;z<_5c5.length;z++){
|
||
|
if(dojo.lang.isArray(_5bd[_5c5[z]])){
|
||
|
_5bd[_5c5[z]].push(_5c4);
|
||
|
}else{
|
||
|
_5bd[_5c5[z]]=_5c4;
|
||
|
}
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
var _5c9=_5c4.getAttribute(this.eventAttachProperty);
|
||
|
if(_5c9){
|
||
|
var evts=_5c9.split(";");
|
||
|
for(var y=0;y<evts.length;y++){
|
||
|
if((!evts[y])||(!evts[y].length)){
|
||
|
continue;
|
||
|
}
|
||
|
var _5cb=null;
|
||
|
var tevt=trim(evts[y]);
|
||
|
if(evts[y].indexOf(":")>=0){
|
||
|
var _5cd=tevt.split(":");
|
||
|
tevt=trim(_5cd[0]);
|
||
|
_5cb=trim(_5cd[1]);
|
||
|
}
|
||
|
if(!_5cb){
|
||
|
_5cb=tevt;
|
||
|
}
|
||
|
var tf=function(){
|
||
|
var ntf=new String(_5cb);
|
||
|
return function(evt){
|
||
|
if(_5c2[ntf]){
|
||
|
_5c2[ntf](dojo.event.browser.fixEvent(evt,this));
|
||
|
}
|
||
|
};
|
||
|
}();
|
||
|
dojo.event.browser.addListener(_5c4,tevt,tf,false,true);
|
||
|
}
|
||
|
}
|
||
|
for(var y=0;y<_5be.length;y++){
|
||
|
var _5d1=_5c4.getAttribute(_5be[y]);
|
||
|
if((_5d1)&&(_5d1.length)){
|
||
|
var _5cb=null;
|
||
|
var _5d2=_5be[y].substr(4);
|
||
|
_5cb=trim(_5d1);
|
||
|
var _5d3=[_5cb];
|
||
|
if(_5cb.indexOf(";")>=0){
|
||
|
_5d3=dojo.lang.map(_5cb.split(";"),trim);
|
||
|
}
|
||
|
for(var z=0;z<_5d3.length;z++){
|
||
|
if(!_5d3[z].length){
|
||
|
continue;
|
||
|
}
|
||
|
var tf=function(){
|
||
|
var ntf=new String(_5d3[z]);
|
||
|
return function(evt){
|
||
|
if(_5c2[ntf]){
|
||
|
_5c2[ntf](dojo.event.browser.fixEvent(evt,this));
|
||
|
}
|
||
|
};
|
||
|
}();
|
||
|
dojo.event.browser.addListener(_5c4,_5d2,tf,false,true);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
var _5d6=_5c4.getAttribute(this.templateProperty);
|
||
|
if(_5d6){
|
||
|
_5bd[_5d6]=_5c4;
|
||
|
}
|
||
|
dojo.lang.forEach(dojo.widget.waiNames,function(name){
|
||
|
var wai=dojo.widget.wai[name];
|
||
|
var val=_5c4.getAttribute(wai.name);
|
||
|
if(val){
|
||
|
if(val.indexOf("-")==-1){
|
||
|
dojo.widget.wai.setAttr(_5c4,wai.name,"role",val);
|
||
|
}else{
|
||
|
var _5da=val.split("-");
|
||
|
dojo.widget.wai.setAttr(_5c4,wai.name,_5da[0],_5da[1]);
|
||
|
}
|
||
|
}
|
||
|
},this);
|
||
|
var _5db=_5c4.getAttribute(this.onBuildProperty);
|
||
|
if(_5db){
|
||
|
eval("var node = baseNode; var widget = targetObj; "+_5db);
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.widget.getDojoEventsFromStr=function(str){
|
||
|
var re=/(dojoOn([a-z]+)(\s?))=/gi;
|
||
|
var evts=str?str.match(re)||[]:[];
|
||
|
var ret=[];
|
||
|
var lem={};
|
||
|
for(var x=0;x<evts.length;x++){
|
||
|
if(evts[x].length<1){
|
||
|
continue;
|
||
|
}
|
||
|
var cm=evts[x].replace(/\s/,"");
|
||
|
cm=(cm.slice(0,cm.length-1));
|
||
|
if(!lem[cm]){
|
||
|
lem[cm]=true;
|
||
|
ret.push(cm);
|
||
|
}
|
||
|
}
|
||
|
return ret;
|
||
|
};
|
||
|
dojo.declare("dojo.widget.DomWidget",dojo.widget.Widget,function(){
|
||
|
if((arguments.length>0)&&(typeof arguments[0]=="object")){
|
||
|
this.create(arguments[0]);
|
||
|
}
|
||
|
},{templateNode:null,templateString:null,templateCssString:null,preventClobber:false,domNode:null,containerNode:null,widgetsInTemplate:false,addChild:function(_5e3,_5e4,pos,ref,_5e7){
|
||
|
if(!this.isContainer){
|
||
|
dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget");
|
||
|
return null;
|
||
|
}else{
|
||
|
if(_5e7==undefined){
|
||
|
_5e7=this.children.length;
|
||
|
}
|
||
|
this.addWidgetAsDirectChild(_5e3,_5e4,pos,ref,_5e7);
|
||
|
this.registerChild(_5e3,_5e7);
|
||
|
}
|
||
|
return _5e3;
|
||
|
},addWidgetAsDirectChild:function(_5e8,_5e9,pos,ref,_5ec){
|
||
|
if((!this.containerNode)&&(!_5e9)){
|
||
|
this.containerNode=this.domNode;
|
||
|
}
|
||
|
var cn=(_5e9)?_5e9:this.containerNode;
|
||
|
if(!pos){
|
||
|
pos="after";
|
||
|
}
|
||
|
if(!ref){
|
||
|
if(!cn){
|
||
|
cn=dojo.body();
|
||
|
}
|
||
|
ref=cn.lastChild;
|
||
|
}
|
||
|
if(!_5ec){
|
||
|
_5ec=0;
|
||
|
}
|
||
|
_5e8.domNode.setAttribute("dojoinsertionindex",_5ec);
|
||
|
if(!ref){
|
||
|
cn.appendChild(_5e8.domNode);
|
||
|
}else{
|
||
|
if(pos=="insertAtIndex"){
|
||
|
dojo.dom.insertAtIndex(_5e8.domNode,ref.parentNode,_5ec);
|
||
|
}else{
|
||
|
if((pos=="after")&&(ref===cn.lastChild)){
|
||
|
cn.appendChild(_5e8.domNode);
|
||
|
}else{
|
||
|
dojo.dom.insertAtPosition(_5e8.domNode,cn,pos);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},registerChild:function(_5ee,_5ef){
|
||
|
_5ee.dojoInsertionIndex=_5ef;
|
||
|
var idx=-1;
|
||
|
for(var i=0;i<this.children.length;i++){
|
||
|
if(this.children[i].dojoInsertionIndex<=_5ef){
|
||
|
idx=i;
|
||
|
}
|
||
|
}
|
||
|
this.children.splice(idx+1,0,_5ee);
|
||
|
_5ee.parent=this;
|
||
|
_5ee.addedTo(this,idx+1);
|
||
|
delete dojo.widget.manager.topWidgets[_5ee.widgetId];
|
||
|
},removeChild:function(_5f2){
|
||
|
dojo.dom.removeNode(_5f2.domNode);
|
||
|
return dojo.widget.DomWidget.superclass.removeChild.call(this,_5f2);
|
||
|
},getFragNodeRef:function(frag){
|
||
|
if(!frag){
|
||
|
return null;
|
||
|
}
|
||
|
if(!frag[this.getNamespacedType()]){
|
||
|
dojo.raise("Error: no frag for widget type "+this.getNamespacedType()+", id "+this.widgetId+" (maybe a widget has set it's type incorrectly)");
|
||
|
}
|
||
|
return frag[this.getNamespacedType()]["nodeRef"];
|
||
|
},postInitialize:function(args,frag,_5f6){
|
||
|
var _5f7=this.getFragNodeRef(frag);
|
||
|
if(_5f6&&(_5f6.snarfChildDomOutput||!_5f7)){
|
||
|
_5f6.addWidgetAsDirectChild(this,"","insertAtIndex","",args["dojoinsertionindex"],_5f7);
|
||
|
}else{
|
||
|
if(_5f7){
|
||
|
if(this.domNode&&(this.domNode!==_5f7)){
|
||
|
this._sourceNodeRef=dojo.dom.replaceNode(_5f7,this.domNode);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(_5f6){
|
||
|
_5f6.registerChild(this,args.dojoinsertionindex);
|
||
|
}else{
|
||
|
dojo.widget.manager.topWidgets[this.widgetId]=this;
|
||
|
}
|
||
|
if(this.widgetsInTemplate){
|
||
|
var _5f8=new dojo.xml.Parse();
|
||
|
var _5f9;
|
||
|
var _5fa=this.domNode.getElementsByTagName("*");
|
||
|
for(var i=0;i<_5fa.length;i++){
|
||
|
if(_5fa[i].getAttribute("dojoAttachPoint")=="subContainerWidget"){
|
||
|
_5f9=_5fa[i];
|
||
|
}
|
||
|
if(_5fa[i].getAttribute("dojoType")){
|
||
|
_5fa[i].setAttribute("isSubWidget",true);
|
||
|
}
|
||
|
}
|
||
|
if(this.isContainer&&!this.containerNode){
|
||
|
if(_5f9){
|
||
|
var src=this.getFragNodeRef(frag);
|
||
|
if(src){
|
||
|
dojo.dom.moveChildren(src,_5f9);
|
||
|
frag["dojoDontFollow"]=true;
|
||
|
}
|
||
|
}else{
|
||
|
dojo.debug("No subContainerWidget node can be found in template file for widget "+this);
|
||
|
}
|
||
|
}
|
||
|
var _5fd=_5f8.parseElement(this.domNode,null,true);
|
||
|
dojo.widget.getParser().createSubComponents(_5fd,this);
|
||
|
var _5fe=[];
|
||
|
var _5ff=[this];
|
||
|
var w;
|
||
|
while((w=_5ff.pop())){
|
||
|
for(var i=0;i<w.children.length;i++){
|
||
|
var _601=w.children[i];
|
||
|
if(_601._processedSubWidgets||!_601.extraArgs["issubwidget"]){
|
||
|
continue;
|
||
|
}
|
||
|
_5fe.push(_601);
|
||
|
if(_601.isContainer){
|
||
|
_5ff.push(_601);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
for(var i=0;i<_5fe.length;i++){
|
||
|
var _602=_5fe[i];
|
||
|
if(_602._processedSubWidgets){
|
||
|
dojo.debug("This should not happen: widget._processedSubWidgets is already true!");
|
||
|
return;
|
||
|
}
|
||
|
_602._processedSubWidgets=true;
|
||
|
if(_602.extraArgs["dojoattachevent"]){
|
||
|
var evts=_602.extraArgs["dojoattachevent"].split(";");
|
||
|
for(var j=0;j<evts.length;j++){
|
||
|
var _605=null;
|
||
|
var tevt=dojo.string.trim(evts[j]);
|
||
|
if(tevt.indexOf(":")>=0){
|
||
|
var _607=tevt.split(":");
|
||
|
tevt=dojo.string.trim(_607[0]);
|
||
|
_605=dojo.string.trim(_607[1]);
|
||
|
}
|
||
|
if(!_605){
|
||
|
_605=tevt;
|
||
|
}
|
||
|
if(dojo.lang.isFunction(_602[tevt])){
|
||
|
dojo.event.kwConnect({srcObj:_602,srcFunc:tevt,targetObj:this,targetFunc:_605});
|
||
|
}else{
|
||
|
alert(tevt+" is not a function in widget "+_602);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(_602.extraArgs["dojoattachpoint"]){
|
||
|
this[_602.extraArgs["dojoattachpoint"]]=_602;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(this.isContainer&&!frag["dojoDontFollow"]){
|
||
|
dojo.widget.getParser().createSubComponents(frag,this);
|
||
|
}
|
||
|
},buildRendering:function(args,frag){
|
||
|
var ts=dojo.widget._templateCache[this.widgetType];
|
||
|
if(args["templatecsspath"]){
|
||
|
args["templateCssPath"]=args["templatecsspath"];
|
||
|
}
|
||
|
var _60b=args["templateCssPath"]||this.templateCssPath;
|
||
|
if(_60b&&!dojo.widget._cssFiles[_60b.toString()]){
|
||
|
if((!this.templateCssString)&&(_60b)){
|
||
|
this.templateCssString=dojo.hostenv.getText(_60b);
|
||
|
this.templateCssPath=null;
|
||
|
}
|
||
|
dojo.widget._cssFiles[_60b.toString()]=true;
|
||
|
}
|
||
|
if((this["templateCssString"])&&(!dojo.widget._cssStrings[this.templateCssString])){
|
||
|
dojo.html.insertCssText(this.templateCssString,null,_60b);
|
||
|
dojo.widget._cssStrings[this.templateCssString]=true;
|
||
|
}
|
||
|
if((!this.preventClobber)&&((this.templatePath)||(this.templateNode)||((this["templateString"])&&(this.templateString.length))||((typeof ts!="undefined")&&((ts["string"])||(ts["node"]))))){
|
||
|
this.buildFromTemplate(args,frag);
|
||
|
}else{
|
||
|
this.domNode=this.getFragNodeRef(frag);
|
||
|
}
|
||
|
this.fillInTemplate(args,frag);
|
||
|
},buildFromTemplate:function(args,frag){
|
||
|
var _60e=false;
|
||
|
if(args["templatepath"]){
|
||
|
args["templatePath"]=args["templatepath"];
|
||
|
}
|
||
|
dojo.widget.fillFromTemplateCache(this,args["templatePath"],null,_60e);
|
||
|
var ts=dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType];
|
||
|
if((ts)&&(!_60e)){
|
||
|
if(!this.templateString.length){
|
||
|
this.templateString=ts["string"];
|
||
|
}
|
||
|
if(!this.templateNode){
|
||
|
this.templateNode=ts["node"];
|
||
|
}
|
||
|
}
|
||
|
var _610=false;
|
||
|
var node=null;
|
||
|
var tstr=this.templateString;
|
||
|
if((!this.templateNode)&&(this.templateString)){
|
||
|
_610=this.templateString.match(/\$\{([^\}]+)\}/g);
|
||
|
if(_610){
|
||
|
var hash=this.strings||{};
|
||
|
for(var key in dojo.widget.defaultStrings){
|
||
|
if(dojo.lang.isUndefined(hash[key])){
|
||
|
hash[key]=dojo.widget.defaultStrings[key];
|
||
|
}
|
||
|
}
|
||
|
for(var i=0;i<_610.length;i++){
|
||
|
var key=_610[i];
|
||
|
key=key.substring(2,key.length-1);
|
||
|
var kval=(key.substring(0,5)=="this.")?dojo.lang.getObjPathValue(key.substring(5),this):hash[key];
|
||
|
var _617;
|
||
|
if((kval)||(dojo.lang.isString(kval))){
|
||
|
_617=new String((dojo.lang.isFunction(kval))?kval.call(this,key,this.templateString):kval);
|
||
|
while(_617.indexOf("\"")>-1){
|
||
|
_617=_617.replace("\"",""");
|
||
|
}
|
||
|
tstr=tstr.replace(_610[i],_617);
|
||
|
}
|
||
|
}
|
||
|
}else{
|
||
|
this.templateNode=this.createNodesFromText(this.templateString,true)[0];
|
||
|
if(!_60e){
|
||
|
ts.node=this.templateNode;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if((!this.templateNode)&&(!_610)){
|
||
|
dojo.debug("DomWidget.buildFromTemplate: could not create template");
|
||
|
return false;
|
||
|
}else{
|
||
|
if(!_610){
|
||
|
node=this.templateNode.cloneNode(true);
|
||
|
if(!node){
|
||
|
return false;
|
||
|
}
|
||
|
}else{
|
||
|
node=this.createNodesFromText(tstr,true)[0];
|
||
|
}
|
||
|
}
|
||
|
this.domNode=node;
|
||
|
this.attachTemplateNodes();
|
||
|
if(this.isContainer&&this.containerNode){
|
||
|
var src=this.getFragNodeRef(frag);
|
||
|
if(src){
|
||
|
dojo.dom.moveChildren(src,this.containerNode);
|
||
|
}
|
||
|
}
|
||
|
},attachTemplateNodes:function(_619,_61a){
|
||
|
if(!_619){
|
||
|
_619=this.domNode;
|
||
|
}
|
||
|
if(!_61a){
|
||
|
_61a=this;
|
||
|
}
|
||
|
return dojo.widget.attachTemplateNodes(_619,_61a,dojo.widget.getDojoEventsFromStr(this.templateString));
|
||
|
},fillInTemplate:function(){
|
||
|
},destroyRendering:function(){
|
||
|
try{
|
||
|
dojo.dom.destroyNode(this.domNode);
|
||
|
delete this.domNode;
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
if(this._sourceNodeRef){
|
||
|
try{
|
||
|
dojo.dom.destroyNode(this._sourceNodeRef);
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
}
|
||
|
},createNodesFromText:function(){
|
||
|
dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText");
|
||
|
}});
|
||
|
dojo.provide("dojo.html.display");
|
||
|
dojo.html._toggle=function(node,_61c,_61d){
|
||
|
node=dojo.byId(node);
|
||
|
_61d(node,!_61c(node));
|
||
|
return _61c(node);
|
||
|
};
|
||
|
dojo.html.show=function(node){
|
||
|
node=dojo.byId(node);
|
||
|
if(dojo.html.getStyleProperty(node,"display")=="none"){
|
||
|
dojo.html.setStyle(node,"display",(node.dojoDisplayCache||""));
|
||
|
node.dojoDisplayCache=undefined;
|
||
|
}
|
||
|
};
|
||
|
dojo.html.hide=function(node){
|
||
|
node=dojo.byId(node);
|
||
|
if(typeof node["dojoDisplayCache"]=="undefined"){
|
||
|
var d=dojo.html.getStyleProperty(node,"display");
|
||
|
if(d!="none"){
|
||
|
node.dojoDisplayCache=d;
|
||
|
}
|
||
|
}
|
||
|
dojo.html.setStyle(node,"display","none");
|
||
|
};
|
||
|
dojo.html.setShowing=function(node,_622){
|
||
|
dojo.html[(_622?"show":"hide")](node);
|
||
|
};
|
||
|
dojo.html.isShowing=function(node){
|
||
|
return (dojo.html.getStyleProperty(node,"display")!="none");
|
||
|
};
|
||
|
dojo.html.toggleShowing=function(node){
|
||
|
return dojo.html._toggle(node,dojo.html.isShowing,dojo.html.setShowing);
|
||
|
};
|
||
|
dojo.html.displayMap={tr:"",td:"",th:"",img:"inline",span:"inline",input:"inline",button:"inline"};
|
||
|
dojo.html.suggestDisplayByTagName=function(node){
|
||
|
node=dojo.byId(node);
|
||
|
if(node&&node.tagName){
|
||
|
var tag=node.tagName.toLowerCase();
|
||
|
return (tag in dojo.html.displayMap?dojo.html.displayMap[tag]:"block");
|
||
|
}
|
||
|
};
|
||
|
dojo.html.setDisplay=function(node,_628){
|
||
|
dojo.html.setStyle(node,"display",((_628 instanceof String||typeof _628=="string")?_628:(_628?dojo.html.suggestDisplayByTagName(node):"none")));
|
||
|
};
|
||
|
dojo.html.isDisplayed=function(node){
|
||
|
return (dojo.html.getComputedStyle(node,"display")!="none");
|
||
|
};
|
||
|
dojo.html.toggleDisplay=function(node){
|
||
|
return dojo.html._toggle(node,dojo.html.isDisplayed,dojo.html.setDisplay);
|
||
|
};
|
||
|
dojo.html.setVisibility=function(node,_62c){
|
||
|
dojo.html.setStyle(node,"visibility",((_62c instanceof String||typeof _62c=="string")?_62c:(_62c?"visible":"hidden")));
|
||
|
};
|
||
|
dojo.html.isVisible=function(node){
|
||
|
return (dojo.html.getComputedStyle(node,"visibility")!="hidden");
|
||
|
};
|
||
|
dojo.html.toggleVisibility=function(node){
|
||
|
return dojo.html._toggle(node,dojo.html.isVisible,dojo.html.setVisibility);
|
||
|
};
|
||
|
dojo.html.setOpacity=function(node,_630,_631){
|
||
|
node=dojo.byId(node);
|
||
|
var h=dojo.render.html;
|
||
|
if(!_631){
|
||
|
if(_630>=1){
|
||
|
if(h.ie){
|
||
|
dojo.html.clearOpacity(node);
|
||
|
return;
|
||
|
}else{
|
||
|
_630=0.999999;
|
||
|
}
|
||
|
}else{
|
||
|
if(_630<0){
|
||
|
_630=0;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(h.ie){
|
||
|
if(node.nodeName.toLowerCase()=="tr"){
|
||
|
var tds=node.getElementsByTagName("td");
|
||
|
for(var x=0;x<tds.length;x++){
|
||
|
tds[x].style.filter="Alpha(Opacity="+_630*100+")";
|
||
|
}
|
||
|
}
|
||
|
node.style.filter="Alpha(Opacity="+_630*100+")";
|
||
|
}else{
|
||
|
if(h.moz){
|
||
|
node.style.opacity=_630;
|
||
|
node.style.MozOpacity=_630;
|
||
|
}else{
|
||
|
if(h.safari){
|
||
|
node.style.opacity=_630;
|
||
|
node.style.KhtmlOpacity=_630;
|
||
|
}else{
|
||
|
node.style.opacity=_630;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.html.clearOpacity=function(node){
|
||
|
node=dojo.byId(node);
|
||
|
var ns=node.style;
|
||
|
var h=dojo.render.html;
|
||
|
if(h.ie){
|
||
|
try{
|
||
|
if(node.filters&&node.filters.alpha){
|
||
|
ns.filter="";
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
}else{
|
||
|
if(h.moz){
|
||
|
ns.opacity=1;
|
||
|
ns.MozOpacity=1;
|
||
|
}else{
|
||
|
if(h.safari){
|
||
|
ns.opacity=1;
|
||
|
ns.KhtmlOpacity=1;
|
||
|
}else{
|
||
|
ns.opacity=1;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.html.getOpacity=function(node){
|
||
|
node=dojo.byId(node);
|
||
|
var h=dojo.render.html;
|
||
|
if(h.ie){
|
||
|
var opac=(node.filters&&node.filters.alpha&&typeof node.filters.alpha.opacity=="number"?node.filters.alpha.opacity:100)/100;
|
||
|
}else{
|
||
|
var opac=node.style.opacity||node.style.MozOpacity||node.style.KhtmlOpacity||1;
|
||
|
}
|
||
|
return opac>=0.999999?1:Number(opac);
|
||
|
};
|
||
|
dojo.provide("dojo.html.layout");
|
||
|
dojo.html.sumAncestorProperties=function(node,prop){
|
||
|
node=dojo.byId(node);
|
||
|
if(!node){
|
||
|
return 0;
|
||
|
}
|
||
|
var _63d=0;
|
||
|
while(node){
|
||
|
if(dojo.html.getComputedStyle(node,"position")=="fixed"){
|
||
|
return 0;
|
||
|
}
|
||
|
var val=node[prop];
|
||
|
if(val){
|
||
|
_63d+=val-0;
|
||
|
if(node==dojo.body()){
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
node=node.parentNode;
|
||
|
}
|
||
|
return _63d;
|
||
|
};
|
||
|
dojo.html.setStyleAttributes=function(node,_640){
|
||
|
node=dojo.byId(node);
|
||
|
var _641=_640.replace(/(;)?\s*$/,"").split(";");
|
||
|
for(var i=0;i<_641.length;i++){
|
||
|
var _643=_641[i].split(":");
|
||
|
var name=_643[0].replace(/\s*$/,"").replace(/^\s*/,"").toLowerCase();
|
||
|
var _645=_643[1].replace(/\s*$/,"").replace(/^\s*/,"");
|
||
|
switch(name){
|
||
|
case "opacity":
|
||
|
dojo.html.setOpacity(node,_645);
|
||
|
break;
|
||
|
case "content-height":
|
||
|
dojo.html.setContentBox(node,{height:_645});
|
||
|
break;
|
||
|
case "content-width":
|
||
|
dojo.html.setContentBox(node,{width:_645});
|
||
|
break;
|
||
|
case "outer-height":
|
||
|
dojo.html.setMarginBox(node,{height:_645});
|
||
|
break;
|
||
|
case "outer-width":
|
||
|
dojo.html.setMarginBox(node,{width:_645});
|
||
|
break;
|
||
|
default:
|
||
|
node.style[dojo.html.toCamelCase(name)]=_645;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.html.boxSizing={MARGIN_BOX:"margin-box",BORDER_BOX:"border-box",PADDING_BOX:"padding-box",CONTENT_BOX:"content-box"};
|
||
|
dojo.html.getAbsolutePosition=dojo.html.abs=function(node,_647,_648){
|
||
|
node=dojo.byId(node,node.ownerDocument);
|
||
|
var ret={x:0,y:0};
|
||
|
var bs=dojo.html.boxSizing;
|
||
|
if(!_648){
|
||
|
_648=bs.CONTENT_BOX;
|
||
|
}
|
||
|
var _64b=2;
|
||
|
var _64c;
|
||
|
switch(_648){
|
||
|
case bs.MARGIN_BOX:
|
||
|
_64c=3;
|
||
|
break;
|
||
|
case bs.BORDER_BOX:
|
||
|
_64c=2;
|
||
|
break;
|
||
|
case bs.PADDING_BOX:
|
||
|
default:
|
||
|
_64c=1;
|
||
|
break;
|
||
|
case bs.CONTENT_BOX:
|
||
|
_64c=0;
|
||
|
break;
|
||
|
}
|
||
|
var h=dojo.render.html;
|
||
|
var db=document["body"]||document["documentElement"];
|
||
|
if(h.ie){
|
||
|
with(node.getBoundingClientRect()){
|
||
|
ret.x=left-2;
|
||
|
ret.y=top-2;
|
||
|
}
|
||
|
}else{
|
||
|
if(document.getBoxObjectFor){
|
||
|
_64b=1;
|
||
|
try{
|
||
|
var bo=document.getBoxObjectFor(node);
|
||
|
ret.x=bo.x-dojo.html.sumAncestorProperties(node,"scrollLeft");
|
||
|
ret.y=bo.y-dojo.html.sumAncestorProperties(node,"scrollTop");
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
}else{
|
||
|
if(node["offsetParent"]){
|
||
|
var _650;
|
||
|
if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){
|
||
|
_650=db;
|
||
|
}else{
|
||
|
_650=db.parentNode;
|
||
|
}
|
||
|
if(node.parentNode!=db){
|
||
|
var nd=node;
|
||
|
if(dojo.render.html.opera){
|
||
|
nd=db;
|
||
|
}
|
||
|
ret.x-=dojo.html.sumAncestorProperties(nd,"scrollLeft");
|
||
|
ret.y-=dojo.html.sumAncestorProperties(nd,"scrollTop");
|
||
|
}
|
||
|
var _652=node;
|
||
|
do{
|
||
|
var n=_652["offsetLeft"];
|
||
|
if(!h.opera||n>0){
|
||
|
ret.x+=isNaN(n)?0:n;
|
||
|
}
|
||
|
var m=_652["offsetTop"];
|
||
|
ret.y+=isNaN(m)?0:m;
|
||
|
_652=_652.offsetParent;
|
||
|
}while((_652!=_650)&&(_652!=null));
|
||
|
}else{
|
||
|
if(node["x"]&&node["y"]){
|
||
|
ret.x+=isNaN(node.x)?0:node.x;
|
||
|
ret.y+=isNaN(node.y)?0:node.y;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(_647){
|
||
|
var _655=dojo.html.getScroll();
|
||
|
ret.y+=_655.top;
|
||
|
ret.x+=_655.left;
|
||
|
}
|
||
|
var _656=[dojo.html.getPaddingExtent,dojo.html.getBorderExtent,dojo.html.getMarginExtent];
|
||
|
if(_64b>_64c){
|
||
|
for(var i=_64c;i<_64b;++i){
|
||
|
ret.y+=_656[i](node,"top");
|
||
|
ret.x+=_656[i](node,"left");
|
||
|
}
|
||
|
}else{
|
||
|
if(_64b<_64c){
|
||
|
for(var i=_64c;i>_64b;--i){
|
||
|
ret.y-=_656[i-1](node,"top");
|
||
|
ret.x-=_656[i-1](node,"left");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
ret.top=ret.y;
|
||
|
ret.left=ret.x;
|
||
|
return ret;
|
||
|
};
|
||
|
dojo.html.isPositionAbsolute=function(node){
|
||
|
return (dojo.html.getComputedStyle(node,"position")=="absolute");
|
||
|
};
|
||
|
dojo.html._sumPixelValues=function(node,_65a,_65b){
|
||
|
var _65c=0;
|
||
|
for(var x=0;x<_65a.length;x++){
|
||
|
_65c+=dojo.html.getPixelValue(node,_65a[x],_65b);
|
||
|
}
|
||
|
return _65c;
|
||
|
};
|
||
|
dojo.html.getMargin=function(node){
|
||
|
return {width:dojo.html._sumPixelValues(node,["margin-left","margin-right"],(dojo.html.getComputedStyle(node,"position")=="absolute")),height:dojo.html._sumPixelValues(node,["margin-top","margin-bottom"],(dojo.html.getComputedStyle(node,"position")=="absolute"))};
|
||
|
};
|
||
|
dojo.html.getBorder=function(node){
|
||
|
return {width:dojo.html.getBorderExtent(node,"left")+dojo.html.getBorderExtent(node,"right"),height:dojo.html.getBorderExtent(node,"top")+dojo.html.getBorderExtent(node,"bottom")};
|
||
|
};
|
||
|
dojo.html.getBorderExtent=function(node,side){
|
||
|
return (dojo.html.getStyle(node,"border-"+side+"-style")=="none"?0:dojo.html.getPixelValue(node,"border-"+side+"-width"));
|
||
|
};
|
||
|
dojo.html.getMarginExtent=function(node,side){
|
||
|
return dojo.html._sumPixelValues(node,["margin-"+side],dojo.html.isPositionAbsolute(node));
|
||
|
};
|
||
|
dojo.html.getPaddingExtent=function(node,side){
|
||
|
return dojo.html._sumPixelValues(node,["padding-"+side],true);
|
||
|
};
|
||
|
dojo.html.getPadding=function(node){
|
||
|
return {width:dojo.html._sumPixelValues(node,["padding-left","padding-right"],true),height:dojo.html._sumPixelValues(node,["padding-top","padding-bottom"],true)};
|
||
|
};
|
||
|
dojo.html.getPadBorder=function(node){
|
||
|
var pad=dojo.html.getPadding(node);
|
||
|
var _669=dojo.html.getBorder(node);
|
||
|
return {width:pad.width+_669.width,height:pad.height+_669.height};
|
||
|
};
|
||
|
dojo.html.getBoxSizing=function(node){
|
||
|
var h=dojo.render.html;
|
||
|
var bs=dojo.html.boxSizing;
|
||
|
if(((h.ie)||(h.opera))&&node.nodeName.toLowerCase()!="img"){
|
||
|
var cm=document["compatMode"];
|
||
|
if((cm=="BackCompat")||(cm=="QuirksMode")){
|
||
|
return bs.BORDER_BOX;
|
||
|
}else{
|
||
|
return bs.CONTENT_BOX;
|
||
|
}
|
||
|
}else{
|
||
|
if(arguments.length==0){
|
||
|
node=document.documentElement;
|
||
|
}
|
||
|
var _66e;
|
||
|
if(!h.ie){
|
||
|
_66e=dojo.html.getStyle(node,"-moz-box-sizing");
|
||
|
if(!_66e){
|
||
|
_66e=dojo.html.getStyle(node,"box-sizing");
|
||
|
}
|
||
|
}
|
||
|
return (_66e?_66e:bs.CONTENT_BOX);
|
||
|
}
|
||
|
};
|
||
|
dojo.html.isBorderBox=function(node){
|
||
|
return (dojo.html.getBoxSizing(node)==dojo.html.boxSizing.BORDER_BOX);
|
||
|
};
|
||
|
dojo.html.getBorderBox=function(node){
|
||
|
node=dojo.byId(node);
|
||
|
return {width:node.offsetWidth,height:node.offsetHeight};
|
||
|
};
|
||
|
dojo.html.getPaddingBox=function(node){
|
||
|
var box=dojo.html.getBorderBox(node);
|
||
|
var _673=dojo.html.getBorder(node);
|
||
|
return {width:box.width-_673.width,height:box.height-_673.height};
|
||
|
};
|
||
|
dojo.html.getContentBox=function(node){
|
||
|
node=dojo.byId(node);
|
||
|
var _675=dojo.html.getPadBorder(node);
|
||
|
return {width:node.offsetWidth-_675.width,height:node.offsetHeight-_675.height};
|
||
|
};
|
||
|
dojo.html.setContentBox=function(node,args){
|
||
|
node=dojo.byId(node);
|
||
|
var _678=0;
|
||
|
var _679=0;
|
||
|
var isbb=dojo.html.isBorderBox(node);
|
||
|
var _67b=(isbb?dojo.html.getPadBorder(node):{width:0,height:0});
|
||
|
var ret={};
|
||
|
if(typeof args.width!="undefined"){
|
||
|
_678=args.width+_67b.width;
|
||
|
ret.width=dojo.html.setPositivePixelValue(node,"width",_678);
|
||
|
}
|
||
|
if(typeof args.height!="undefined"){
|
||
|
_679=args.height+_67b.height;
|
||
|
ret.height=dojo.html.setPositivePixelValue(node,"height",_679);
|
||
|
}
|
||
|
return ret;
|
||
|
};
|
||
|
dojo.html.getMarginBox=function(node){
|
||
|
var _67e=dojo.html.getBorderBox(node);
|
||
|
var _67f=dojo.html.getMargin(node);
|
||
|
return {width:_67e.width+_67f.width,height:_67e.height+_67f.height};
|
||
|
};
|
||
|
dojo.html.setMarginBox=function(node,args){
|
||
|
node=dojo.byId(node);
|
||
|
var _682=0;
|
||
|
var _683=0;
|
||
|
var isbb=dojo.html.isBorderBox(node);
|
||
|
var _685=(!isbb?dojo.html.getPadBorder(node):{width:0,height:0});
|
||
|
var _686=dojo.html.getMargin(node);
|
||
|
var ret={};
|
||
|
if(typeof args.width!="undefined"){
|
||
|
_682=args.width-_685.width;
|
||
|
_682-=_686.width;
|
||
|
ret.width=dojo.html.setPositivePixelValue(node,"width",_682);
|
||
|
}
|
||
|
if(typeof args.height!="undefined"){
|
||
|
_683=args.height-_685.height;
|
||
|
_683-=_686.height;
|
||
|
ret.height=dojo.html.setPositivePixelValue(node,"height",_683);
|
||
|
}
|
||
|
return ret;
|
||
|
};
|
||
|
dojo.html.getElementBox=function(node,type){
|
||
|
var bs=dojo.html.boxSizing;
|
||
|
switch(type){
|
||
|
case bs.MARGIN_BOX:
|
||
|
return dojo.html.getMarginBox(node);
|
||
|
case bs.BORDER_BOX:
|
||
|
return dojo.html.getBorderBox(node);
|
||
|
case bs.PADDING_BOX:
|
||
|
return dojo.html.getPaddingBox(node);
|
||
|
case bs.CONTENT_BOX:
|
||
|
default:
|
||
|
return dojo.html.getContentBox(node);
|
||
|
}
|
||
|
};
|
||
|
dojo.html.toCoordinateObject=dojo.html.toCoordinateArray=function(_68b,_68c,_68d){
|
||
|
if(_68b instanceof Array||typeof _68b=="array"){
|
||
|
dojo.deprecated("dojo.html.toCoordinateArray","use dojo.html.toCoordinateObject({left: , top: , width: , height: }) instead","0.5");
|
||
|
while(_68b.length<4){
|
||
|
_68b.push(0);
|
||
|
}
|
||
|
while(_68b.length>4){
|
||
|
_68b.pop();
|
||
|
}
|
||
|
var ret={left:_68b[0],top:_68b[1],width:_68b[2],height:_68b[3]};
|
||
|
}else{
|
||
|
if(!_68b.nodeType&&!(_68b instanceof String||typeof _68b=="string")&&("width" in _68b||"height" in _68b||"left" in _68b||"x" in _68b||"top" in _68b||"y" in _68b)){
|
||
|
var ret={left:_68b.left||_68b.x||0,top:_68b.top||_68b.y||0,width:_68b.width||0,height:_68b.height||0};
|
||
|
}else{
|
||
|
var node=dojo.byId(_68b);
|
||
|
var pos=dojo.html.abs(node,_68c,_68d);
|
||
|
var _691=dojo.html.getMarginBox(node);
|
||
|
var ret={left:pos.left,top:pos.top,width:_691.width,height:_691.height};
|
||
|
}
|
||
|
}
|
||
|
ret.x=ret.left;
|
||
|
ret.y=ret.top;
|
||
|
return ret;
|
||
|
};
|
||
|
dojo.html.setMarginBoxWidth=dojo.html.setOuterWidth=function(node,_693){
|
||
|
return dojo.html._callDeprecated("setMarginBoxWidth","setMarginBox",arguments,"width");
|
||
|
};
|
||
|
dojo.html.setMarginBoxHeight=dojo.html.setOuterHeight=function(){
|
||
|
return dojo.html._callDeprecated("setMarginBoxHeight","setMarginBox",arguments,"height");
|
||
|
};
|
||
|
dojo.html.getMarginBoxWidth=dojo.html.getOuterWidth=function(){
|
||
|
return dojo.html._callDeprecated("getMarginBoxWidth","getMarginBox",arguments,null,"width");
|
||
|
};
|
||
|
dojo.html.getMarginBoxHeight=dojo.html.getOuterHeight=function(){
|
||
|
return dojo.html._callDeprecated("getMarginBoxHeight","getMarginBox",arguments,null,"height");
|
||
|
};
|
||
|
dojo.html.getTotalOffset=function(node,type,_696){
|
||
|
return dojo.html._callDeprecated("getTotalOffset","getAbsolutePosition",arguments,null,type);
|
||
|
};
|
||
|
dojo.html.getAbsoluteX=function(node,_698){
|
||
|
return dojo.html._callDeprecated("getAbsoluteX","getAbsolutePosition",arguments,null,"x");
|
||
|
};
|
||
|
dojo.html.getAbsoluteY=function(node,_69a){
|
||
|
return dojo.html._callDeprecated("getAbsoluteY","getAbsolutePosition",arguments,null,"y");
|
||
|
};
|
||
|
dojo.html.totalOffsetLeft=function(node,_69c){
|
||
|
return dojo.html._callDeprecated("totalOffsetLeft","getAbsolutePosition",arguments,null,"left");
|
||
|
};
|
||
|
dojo.html.totalOffsetTop=function(node,_69e){
|
||
|
return dojo.html._callDeprecated("totalOffsetTop","getAbsolutePosition",arguments,null,"top");
|
||
|
};
|
||
|
dojo.html.getMarginWidth=function(node){
|
||
|
return dojo.html._callDeprecated("getMarginWidth","getMargin",arguments,null,"width");
|
||
|
};
|
||
|
dojo.html.getMarginHeight=function(node){
|
||
|
return dojo.html._callDeprecated("getMarginHeight","getMargin",arguments,null,"height");
|
||
|
};
|
||
|
dojo.html.getBorderWidth=function(node){
|
||
|
return dojo.html._callDeprecated("getBorderWidth","getBorder",arguments,null,"width");
|
||
|
};
|
||
|
dojo.html.getBorderHeight=function(node){
|
||
|
return dojo.html._callDeprecated("getBorderHeight","getBorder",arguments,null,"height");
|
||
|
};
|
||
|
dojo.html.getPaddingWidth=function(node){
|
||
|
return dojo.html._callDeprecated("getPaddingWidth","getPadding",arguments,null,"width");
|
||
|
};
|
||
|
dojo.html.getPaddingHeight=function(node){
|
||
|
return dojo.html._callDeprecated("getPaddingHeight","getPadding",arguments,null,"height");
|
||
|
};
|
||
|
dojo.html.getPadBorderWidth=function(node){
|
||
|
return dojo.html._callDeprecated("getPadBorderWidth","getPadBorder",arguments,null,"width");
|
||
|
};
|
||
|
dojo.html.getPadBorderHeight=function(node){
|
||
|
return dojo.html._callDeprecated("getPadBorderHeight","getPadBorder",arguments,null,"height");
|
||
|
};
|
||
|
dojo.html.getBorderBoxWidth=dojo.html.getInnerWidth=function(){
|
||
|
return dojo.html._callDeprecated("getBorderBoxWidth","getBorderBox",arguments,null,"width");
|
||
|
};
|
||
|
dojo.html.getBorderBoxHeight=dojo.html.getInnerHeight=function(){
|
||
|
return dojo.html._callDeprecated("getBorderBoxHeight","getBorderBox",arguments,null,"height");
|
||
|
};
|
||
|
dojo.html.getContentBoxWidth=dojo.html.getContentWidth=function(){
|
||
|
return dojo.html._callDeprecated("getContentBoxWidth","getContentBox",arguments,null,"width");
|
||
|
};
|
||
|
dojo.html.getContentBoxHeight=dojo.html.getContentHeight=function(){
|
||
|
return dojo.html._callDeprecated("getContentBoxHeight","getContentBox",arguments,null,"height");
|
||
|
};
|
||
|
dojo.html.setContentBoxWidth=dojo.html.setContentWidth=function(node,_6a8){
|
||
|
return dojo.html._callDeprecated("setContentBoxWidth","setContentBox",arguments,"width");
|
||
|
};
|
||
|
dojo.html.setContentBoxHeight=dojo.html.setContentHeight=function(node,_6aa){
|
||
|
return dojo.html._callDeprecated("setContentBoxHeight","setContentBox",arguments,"height");
|
||
|
};
|
||
|
dojo.provide("dojo.html.util");
|
||
|
dojo.html.getElementWindow=function(_6ab){
|
||
|
return dojo.html.getDocumentWindow(_6ab.ownerDocument);
|
||
|
};
|
||
|
dojo.html.getDocumentWindow=function(doc){
|
||
|
if(dojo.render.html.safari&&!doc._parentWindow){
|
||
|
var fix=function(win){
|
||
|
win.document._parentWindow=win;
|
||
|
for(var i=0;i<win.frames.length;i++){
|
||
|
fix(win.frames[i]);
|
||
|
}
|
||
|
};
|
||
|
fix(window.top);
|
||
|
}
|
||
|
if(dojo.render.html.ie&&window!==document.parentWindow&&!doc._parentWindow){
|
||
|
doc.parentWindow.execScript("document._parentWindow = window;","Javascript");
|
||
|
var win=doc._parentWindow;
|
||
|
doc._parentWindow=null;
|
||
|
return win;
|
||
|
}
|
||
|
return doc._parentWindow||doc.parentWindow||doc.defaultView;
|
||
|
};
|
||
|
dojo.html.gravity=function(node,e){
|
||
|
node=dojo.byId(node);
|
||
|
var _6b3=dojo.html.getCursorPosition(e);
|
||
|
with(dojo.html){
|
||
|
var _6b4=getAbsolutePosition(node,true);
|
||
|
var bb=getBorderBox(node);
|
||
|
var _6b6=_6b4.x+(bb.width/2);
|
||
|
var _6b7=_6b4.y+(bb.height/2);
|
||
|
}
|
||
|
with(dojo.html.gravity){
|
||
|
return ((_6b3.x<_6b6?WEST:EAST)|(_6b3.y<_6b7?NORTH:SOUTH));
|
||
|
}
|
||
|
};
|
||
|
dojo.html.gravity.NORTH=1;
|
||
|
dojo.html.gravity.SOUTH=1<<1;
|
||
|
dojo.html.gravity.EAST=1<<2;
|
||
|
dojo.html.gravity.WEST=1<<3;
|
||
|
dojo.html.overElement=function(_6b8,e){
|
||
|
_6b8=dojo.byId(_6b8);
|
||
|
var _6ba=dojo.html.getCursorPosition(e);
|
||
|
var bb=dojo.html.getBorderBox(_6b8);
|
||
|
var _6bc=dojo.html.getAbsolutePosition(_6b8,true,dojo.html.boxSizing.BORDER_BOX);
|
||
|
var top=_6bc.y;
|
||
|
var _6be=top+bb.height;
|
||
|
var left=_6bc.x;
|
||
|
var _6c0=left+bb.width;
|
||
|
return (_6ba.x>=left&&_6ba.x<=_6c0&&_6ba.y>=top&&_6ba.y<=_6be);
|
||
|
};
|
||
|
dojo.html.renderedTextContent=function(node){
|
||
|
node=dojo.byId(node);
|
||
|
var _6c2="";
|
||
|
if(node==null){
|
||
|
return _6c2;
|
||
|
}
|
||
|
for(var i=0;i<node.childNodes.length;i++){
|
||
|
switch(node.childNodes[i].nodeType){
|
||
|
case 1:
|
||
|
case 5:
|
||
|
var _6c4="unknown";
|
||
|
try{
|
||
|
_6c4=dojo.html.getStyle(node.childNodes[i],"display");
|
||
|
}
|
||
|
catch(E){
|
||
|
}
|
||
|
switch(_6c4){
|
||
|
case "block":
|
||
|
case "list-item":
|
||
|
case "run-in":
|
||
|
case "table":
|
||
|
case "table-row-group":
|
||
|
case "table-header-group":
|
||
|
case "table-footer-group":
|
||
|
case "table-row":
|
||
|
case "table-column-group":
|
||
|
case "table-column":
|
||
|
case "table-cell":
|
||
|
case "table-caption":
|
||
|
_6c2+="\n";
|
||
|
_6c2+=dojo.html.renderedTextContent(node.childNodes[i]);
|
||
|
_6c2+="\n";
|
||
|
break;
|
||
|
case "none":
|
||
|
break;
|
||
|
default:
|
||
|
if(node.childNodes[i].tagName&&node.childNodes[i].tagName.toLowerCase()=="br"){
|
||
|
_6c2+="\n";
|
||
|
}else{
|
||
|
_6c2+=dojo.html.renderedTextContent(node.childNodes[i]);
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
break;
|
||
|
case 3:
|
||
|
case 2:
|
||
|
case 4:
|
||
|
var text=node.childNodes[i].nodeValue;
|
||
|
var _6c6="unknown";
|
||
|
try{
|
||
|
_6c6=dojo.html.getStyle(node,"text-transform");
|
||
|
}
|
||
|
catch(E){
|
||
|
}
|
||
|
switch(_6c6){
|
||
|
case "capitalize":
|
||
|
var _6c7=text.split(" ");
|
||
|
for(var i=0;i<_6c7.length;i++){
|
||
|
_6c7[i]=_6c7[i].charAt(0).toUpperCase()+_6c7[i].substring(1);
|
||
|
}
|
||
|
text=_6c7.join(" ");
|
||
|
break;
|
||
|
case "uppercase":
|
||
|
text=text.toUpperCase();
|
||
|
break;
|
||
|
case "lowercase":
|
||
|
text=text.toLowerCase();
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
switch(_6c6){
|
||
|
case "nowrap":
|
||
|
break;
|
||
|
case "pre-wrap":
|
||
|
break;
|
||
|
case "pre-line":
|
||
|
break;
|
||
|
case "pre":
|
||
|
break;
|
||
|
default:
|
||
|
text=text.replace(/\s+/," ");
|
||
|
if(/\s$/.test(_6c2)){
|
||
|
text.replace(/^\s/,"");
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
_6c2+=text;
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
return _6c2;
|
||
|
};
|
||
|
dojo.html.createNodesFromText=function(txt,trim){
|
||
|
if(trim){
|
||
|
txt=txt.replace(/^\s+|\s+$/g,"");
|
||
|
}
|
||
|
var tn=dojo.doc().createElement("div");
|
||
|
tn.style.visibility="hidden";
|
||
|
dojo.body().appendChild(tn);
|
||
|
var _6cb="none";
|
||
|
if((/^<t[dh][\s\r\n>]/i).test(txt.replace(/^\s+/))){
|
||
|
txt="<table><tbody><tr>"+txt+"</tr></tbody></table>";
|
||
|
_6cb="cell";
|
||
|
}else{
|
||
|
if((/^<tr[\s\r\n>]/i).test(txt.replace(/^\s+/))){
|
||
|
txt="<table><tbody>"+txt+"</tbody></table>";
|
||
|
_6cb="row";
|
||
|
}else{
|
||
|
if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))){
|
||
|
txt="<table>"+txt+"</table>";
|
||
|
_6cb="section";
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
tn.innerHTML=txt;
|
||
|
if(tn["normalize"]){
|
||
|
tn.normalize();
|
||
|
}
|
||
|
var _6cc=null;
|
||
|
switch(_6cb){
|
||
|
case "cell":
|
||
|
_6cc=tn.getElementsByTagName("tr")[0];
|
||
|
break;
|
||
|
case "row":
|
||
|
_6cc=tn.getElementsByTagName("tbody")[0];
|
||
|
break;
|
||
|
case "section":
|
||
|
_6cc=tn.getElementsByTagName("table")[0];
|
||
|
break;
|
||
|
default:
|
||
|
_6cc=tn;
|
||
|
break;
|
||
|
}
|
||
|
var _6cd=[];
|
||
|
for(var x=0;x<_6cc.childNodes.length;x++){
|
||
|
_6cd.push(_6cc.childNodes[x].cloneNode(true));
|
||
|
}
|
||
|
tn.style.display="none";
|
||
|
dojo.html.destroyNode(tn);
|
||
|
return _6cd;
|
||
|
};
|
||
|
dojo.html.placeOnScreen=function(node,_6d0,_6d1,_6d2,_6d3,_6d4,_6d5){
|
||
|
if(_6d0 instanceof Array||typeof _6d0=="array"){
|
||
|
_6d5=_6d4;
|
||
|
_6d4=_6d3;
|
||
|
_6d3=_6d2;
|
||
|
_6d2=_6d1;
|
||
|
_6d1=_6d0[1];
|
||
|
_6d0=_6d0[0];
|
||
|
}
|
||
|
if(_6d4 instanceof String||typeof _6d4=="string"){
|
||
|
_6d4=_6d4.split(",");
|
||
|
}
|
||
|
if(!isNaN(_6d2)){
|
||
|
_6d2=[Number(_6d2),Number(_6d2)];
|
||
|
}else{
|
||
|
if(!(_6d2 instanceof Array||typeof _6d2=="array")){
|
||
|
_6d2=[0,0];
|
||
|
}
|
||
|
}
|
||
|
var _6d6=dojo.html.getScroll().offset;
|
||
|
var view=dojo.html.getViewport();
|
||
|
node=dojo.byId(node);
|
||
|
var _6d8=node.style.display;
|
||
|
node.style.display="";
|
||
|
var bb=dojo.html.getBorderBox(node);
|
||
|
var w=bb.width;
|
||
|
var h=bb.height;
|
||
|
node.style.display=_6d8;
|
||
|
if(!(_6d4 instanceof Array||typeof _6d4=="array")){
|
||
|
_6d4=["TL"];
|
||
|
}
|
||
|
var _6dc,_6dd,_6de=Infinity,_6df;
|
||
|
for(var _6e0=0;_6e0<_6d4.length;++_6e0){
|
||
|
var _6e1=_6d4[_6e0];
|
||
|
var _6e2=true;
|
||
|
var tryX=_6d0-(_6e1.charAt(1)=="L"?0:w)+_6d2[0]*(_6e1.charAt(1)=="L"?1:-1);
|
||
|
var tryY=_6d1-(_6e1.charAt(0)=="T"?0:h)+_6d2[1]*(_6e1.charAt(0)=="T"?1:-1);
|
||
|
if(_6d3){
|
||
|
tryX-=_6d6.x;
|
||
|
tryY-=_6d6.y;
|
||
|
}
|
||
|
if(tryX<0){
|
||
|
tryX=0;
|
||
|
_6e2=false;
|
||
|
}
|
||
|
if(tryY<0){
|
||
|
tryY=0;
|
||
|
_6e2=false;
|
||
|
}
|
||
|
var x=tryX+w;
|
||
|
if(x>view.width){
|
||
|
x=view.width-w;
|
||
|
_6e2=false;
|
||
|
}else{
|
||
|
x=tryX;
|
||
|
}
|
||
|
x=Math.max(_6d2[0],x)+_6d6.x;
|
||
|
var y=tryY+h;
|
||
|
if(y>view.height){
|
||
|
y=view.height-h;
|
||
|
_6e2=false;
|
||
|
}else{
|
||
|
y=tryY;
|
||
|
}
|
||
|
y=Math.max(_6d2[1],y)+_6d6.y;
|
||
|
if(_6e2){
|
||
|
_6dc=x;
|
||
|
_6dd=y;
|
||
|
_6de=0;
|
||
|
_6df=_6e1;
|
||
|
break;
|
||
|
}else{
|
||
|
var dist=Math.pow(x-tryX-_6d6.x,2)+Math.pow(y-tryY-_6d6.y,2);
|
||
|
if(_6de>dist){
|
||
|
_6de=dist;
|
||
|
_6dc=x;
|
||
|
_6dd=y;
|
||
|
_6df=_6e1;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(!_6d5){
|
||
|
node.style.left=_6dc+"px";
|
||
|
node.style.top=_6dd+"px";
|
||
|
}
|
||
|
return {left:_6dc,top:_6dd,x:_6dc,y:_6dd,dist:_6de,corner:_6df};
|
||
|
};
|
||
|
dojo.html.placeOnScreenPoint=function(node,_6e9,_6ea,_6eb,_6ec){
|
||
|
dojo.deprecated("dojo.html.placeOnScreenPoint","use dojo.html.placeOnScreen() instead","0.5");
|
||
|
return dojo.html.placeOnScreen(node,_6e9,_6ea,_6eb,_6ec,["TL","TR","BL","BR"]);
|
||
|
};
|
||
|
dojo.html.placeOnScreenAroundElement=function(node,_6ee,_6ef,_6f0,_6f1,_6f2){
|
||
|
var best,_6f4=Infinity;
|
||
|
_6ee=dojo.byId(_6ee);
|
||
|
var _6f5=_6ee.style.display;
|
||
|
_6ee.style.display="";
|
||
|
var mb=dojo.html.getElementBox(_6ee,_6f0);
|
||
|
var _6f7=mb.width;
|
||
|
var _6f8=mb.height;
|
||
|
var _6f9=dojo.html.getAbsolutePosition(_6ee,true,_6f0);
|
||
|
_6ee.style.display=_6f5;
|
||
|
for(var _6fa in _6f1){
|
||
|
var pos,_6fc,_6fd;
|
||
|
var _6fe=_6f1[_6fa];
|
||
|
_6fc=_6f9.x+(_6fa.charAt(1)=="L"?0:_6f7);
|
||
|
_6fd=_6f9.y+(_6fa.charAt(0)=="T"?0:_6f8);
|
||
|
pos=dojo.html.placeOnScreen(node,_6fc,_6fd,_6ef,true,_6fe,true);
|
||
|
if(pos.dist==0){
|
||
|
best=pos;
|
||
|
break;
|
||
|
}else{
|
||
|
if(_6f4>pos.dist){
|
||
|
_6f4=pos.dist;
|
||
|
best=pos;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(!_6f2){
|
||
|
node.style.left=best.left+"px";
|
||
|
node.style.top=best.top+"px";
|
||
|
}
|
||
|
return best;
|
||
|
};
|
||
|
dojo.html.scrollIntoView=function(node){
|
||
|
if(!node){
|
||
|
return;
|
||
|
}
|
||
|
if(dojo.render.html.ie){
|
||
|
if(dojo.html.getBorderBox(node.parentNode).height<=node.parentNode.scrollHeight){
|
||
|
node.scrollIntoView(false);
|
||
|
}
|
||
|
}else{
|
||
|
if(dojo.render.html.mozilla){
|
||
|
node.scrollIntoView(false);
|
||
|
}else{
|
||
|
var _700=node.parentNode;
|
||
|
var _701=_700.scrollTop+dojo.html.getBorderBox(_700).height;
|
||
|
var _702=node.offsetTop+dojo.html.getMarginBox(node).height;
|
||
|
if(_701<_702){
|
||
|
_700.scrollTop+=(_702-_701);
|
||
|
}else{
|
||
|
if(_700.scrollTop>node.offsetTop){
|
||
|
_700.scrollTop-=(_700.scrollTop-node.offsetTop);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.provide("dojo.gfx.color");
|
||
|
dojo.gfx.color.Color=function(r,g,b,a){
|
||
|
if(dojo.lang.isArray(r)){
|
||
|
this.r=r[0];
|
||
|
this.g=r[1];
|
||
|
this.b=r[2];
|
||
|
this.a=r[3]||1;
|
||
|
}else{
|
||
|
if(dojo.lang.isString(r)){
|
||
|
var rgb=dojo.gfx.color.extractRGB(r);
|
||
|
this.r=rgb[0];
|
||
|
this.g=rgb[1];
|
||
|
this.b=rgb[2];
|
||
|
this.a=g||1;
|
||
|
}else{
|
||
|
if(r instanceof dojo.gfx.color.Color){
|
||
|
this.r=r.r;
|
||
|
this.b=r.b;
|
||
|
this.g=r.g;
|
||
|
this.a=r.a;
|
||
|
}else{
|
||
|
this.r=r;
|
||
|
this.g=g;
|
||
|
this.b=b;
|
||
|
this.a=a;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.gfx.color.Color.fromArray=function(arr){
|
||
|
return new dojo.gfx.color.Color(arr[0],arr[1],arr[2],arr[3]);
|
||
|
};
|
||
|
dojo.extend(dojo.gfx.color.Color,{toRgb:function(_709){
|
||
|
if(_709){
|
||
|
return this.toRgba();
|
||
|
}else{
|
||
|
return [this.r,this.g,this.b];
|
||
|
}
|
||
|
},toRgba:function(){
|
||
|
return [this.r,this.g,this.b,this.a];
|
||
|
},toHex:function(){
|
||
|
return dojo.gfx.color.rgb2hex(this.toRgb());
|
||
|
},toCss:function(){
|
||
|
return "rgb("+this.toRgb().join()+")";
|
||
|
},toString:function(){
|
||
|
return this.toHex();
|
||
|
},blend:function(_70a,_70b){
|
||
|
var rgb=null;
|
||
|
if(dojo.lang.isArray(_70a)){
|
||
|
rgb=_70a;
|
||
|
}else{
|
||
|
if(_70a instanceof dojo.gfx.color.Color){
|
||
|
rgb=_70a.toRgb();
|
||
|
}else{
|
||
|
rgb=new dojo.gfx.color.Color(_70a).toRgb();
|
||
|
}
|
||
|
}
|
||
|
return dojo.gfx.color.blend(this.toRgb(),rgb,_70b);
|
||
|
}});
|
||
|
dojo.gfx.color.named={white:[255,255,255],black:[0,0,0],red:[255,0,0],green:[0,255,0],lime:[0,255,0],blue:[0,0,255],navy:[0,0,128],gray:[128,128,128],silver:[192,192,192]};
|
||
|
dojo.gfx.color.blend=function(a,b,_70f){
|
||
|
if(typeof a=="string"){
|
||
|
return dojo.gfx.color.blendHex(a,b,_70f);
|
||
|
}
|
||
|
if(!_70f){
|
||
|
_70f=0;
|
||
|
}
|
||
|
_70f=Math.min(Math.max(-1,_70f),1);
|
||
|
_70f=((_70f+1)/2);
|
||
|
var c=[];
|
||
|
for(var x=0;x<3;x++){
|
||
|
c[x]=parseInt(b[x]+((a[x]-b[x])*_70f));
|
||
|
}
|
||
|
return c;
|
||
|
};
|
||
|
dojo.gfx.color.blendHex=function(a,b,_714){
|
||
|
return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a),dojo.gfx.color.hex2rgb(b),_714));
|
||
|
};
|
||
|
dojo.gfx.color.extractRGB=function(_715){
|
||
|
var hex="0123456789abcdef";
|
||
|
_715=_715.toLowerCase();
|
||
|
if(_715.indexOf("rgb")==0){
|
||
|
var _717=_715.match(/rgba*\((\d+), *(\d+), *(\d+)/i);
|
||
|
var ret=_717.splice(1,3);
|
||
|
return ret;
|
||
|
}else{
|
||
|
var _719=dojo.gfx.color.hex2rgb(_715);
|
||
|
if(_719){
|
||
|
return _719;
|
||
|
}else{
|
||
|
return dojo.gfx.color.named[_715]||[255,255,255];
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.gfx.color.hex2rgb=function(hex){
|
||
|
var _71b="0123456789ABCDEF";
|
||
|
var rgb=new Array(3);
|
||
|
if(hex.indexOf("#")==0){
|
||
|
hex=hex.substring(1);
|
||
|
}
|
||
|
hex=hex.toUpperCase();
|
||
|
if(hex.replace(new RegExp("["+_71b+"]","g"),"")!=""){
|
||
|
return null;
|
||
|
}
|
||
|
if(hex.length==3){
|
||
|
rgb[0]=hex.charAt(0)+hex.charAt(0);
|
||
|
rgb[1]=hex.charAt(1)+hex.charAt(1);
|
||
|
rgb[2]=hex.charAt(2)+hex.charAt(2);
|
||
|
}else{
|
||
|
rgb[0]=hex.substring(0,2);
|
||
|
rgb[1]=hex.substring(2,4);
|
||
|
rgb[2]=hex.substring(4);
|
||
|
}
|
||
|
for(var i=0;i<rgb.length;i++){
|
||
|
rgb[i]=_71b.indexOf(rgb[i].charAt(0))*16+_71b.indexOf(rgb[i].charAt(1));
|
||
|
}
|
||
|
return rgb;
|
||
|
};
|
||
|
dojo.gfx.color.rgb2hex=function(r,g,b){
|
||
|
if(dojo.lang.isArray(r)){
|
||
|
g=r[1]||0;
|
||
|
b=r[2]||0;
|
||
|
r=r[0]||0;
|
||
|
}
|
||
|
var ret=dojo.lang.map([r,g,b],function(x){
|
||
|
x=new Number(x);
|
||
|
var s=x.toString(16);
|
||
|
while(s.length<2){
|
||
|
s="0"+s;
|
||
|
}
|
||
|
return s;
|
||
|
});
|
||
|
ret.unshift("#");
|
||
|
return ret.join("");
|
||
|
};
|
||
|
dojo.provide("dojo.lfx.Animation");
|
||
|
dojo.lfx.Line=function(_724,end){
|
||
|
this.start=_724;
|
||
|
this.end=end;
|
||
|
if(dojo.lang.isArray(_724)){
|
||
|
var diff=[];
|
||
|
dojo.lang.forEach(this.start,function(s,i){
|
||
|
diff[i]=this.end[i]-s;
|
||
|
},this);
|
||
|
this.getValue=function(n){
|
||
|
var res=[];
|
||
|
dojo.lang.forEach(this.start,function(s,i){
|
||
|
res[i]=(diff[i]*n)+s;
|
||
|
},this);
|
||
|
return res;
|
||
|
};
|
||
|
}else{
|
||
|
var diff=end-_724;
|
||
|
this.getValue=function(n){
|
||
|
return (diff*n)+this.start;
|
||
|
};
|
||
|
}
|
||
|
};
|
||
|
if((dojo.render.html.khtml)&&(!dojo.render.html.safari)){
|
||
|
dojo.lfx.easeDefault=function(n){
|
||
|
return (parseFloat("0.5")+((Math.sin((n+parseFloat("1.5"))*Math.PI))/2));
|
||
|
};
|
||
|
}else{
|
||
|
dojo.lfx.easeDefault=function(n){
|
||
|
return (0.5+((Math.sin((n+1.5)*Math.PI))/2));
|
||
|
};
|
||
|
}
|
||
|
dojo.lfx.easeIn=function(n){
|
||
|
return Math.pow(n,3);
|
||
|
};
|
||
|
dojo.lfx.easeOut=function(n){
|
||
|
return (1-Math.pow(1-n,3));
|
||
|
};
|
||
|
dojo.lfx.easeInOut=function(n){
|
||
|
return ((3*Math.pow(n,2))-(2*Math.pow(n,3)));
|
||
|
};
|
||
|
dojo.lfx.IAnimation=function(){
|
||
|
};
|
||
|
dojo.lang.extend(dojo.lfx.IAnimation,{curve:null,duration:1000,easing:null,repeatCount:0,rate:10,handler:null,beforeBegin:null,onBegin:null,onAnimate:null,onEnd:null,onPlay:null,onPause:null,onStop:null,play:null,pause:null,stop:null,connect:function(evt,_734,_735){
|
||
|
if(!_735){
|
||
|
_735=_734;
|
||
|
_734=this;
|
||
|
}
|
||
|
_735=dojo.lang.hitch(_734,_735);
|
||
|
var _736=this[evt]||function(){
|
||
|
};
|
||
|
this[evt]=function(){
|
||
|
var ret=_736.apply(this,arguments);
|
||
|
_735.apply(this,arguments);
|
||
|
return ret;
|
||
|
};
|
||
|
return this;
|
||
|
},fire:function(evt,args){
|
||
|
if(this[evt]){
|
||
|
this[evt].apply(this,(args||[]));
|
||
|
}
|
||
|
return this;
|
||
|
},repeat:function(_73a){
|
||
|
this.repeatCount=_73a;
|
||
|
return this;
|
||
|
},_active:false,_paused:false});
|
||
|
dojo.lfx.Animation=function(_73b,_73c,_73d,_73e,_73f,rate){
|
||
|
dojo.lfx.IAnimation.call(this);
|
||
|
if(dojo.lang.isNumber(_73b)||(!_73b&&_73c.getValue)){
|
||
|
rate=_73f;
|
||
|
_73f=_73e;
|
||
|
_73e=_73d;
|
||
|
_73d=_73c;
|
||
|
_73c=_73b;
|
||
|
_73b=null;
|
||
|
}else{
|
||
|
if(_73b.getValue||dojo.lang.isArray(_73b)){
|
||
|
rate=_73e;
|
||
|
_73f=_73d;
|
||
|
_73e=_73c;
|
||
|
_73d=_73b;
|
||
|
_73c=null;
|
||
|
_73b=null;
|
||
|
}
|
||
|
}
|
||
|
if(dojo.lang.isArray(_73d)){
|
||
|
this.curve=new dojo.lfx.Line(_73d[0],_73d[1]);
|
||
|
}else{
|
||
|
this.curve=_73d;
|
||
|
}
|
||
|
if(_73c!=null&&_73c>0){
|
||
|
this.duration=_73c;
|
||
|
}
|
||
|
if(_73f){
|
||
|
this.repeatCount=_73f;
|
||
|
}
|
||
|
if(rate){
|
||
|
this.rate=rate;
|
||
|
}
|
||
|
if(_73b){
|
||
|
dojo.lang.forEach(["handler","beforeBegin","onBegin","onEnd","onPlay","onStop","onAnimate"],function(item){
|
||
|
if(_73b[item]){
|
||
|
this.connect(item,_73b[item]);
|
||
|
}
|
||
|
},this);
|
||
|
}
|
||
|
if(_73e&&dojo.lang.isFunction(_73e)){
|
||
|
this.easing=_73e;
|
||
|
}
|
||
|
};
|
||
|
dojo.inherits(dojo.lfx.Animation,dojo.lfx.IAnimation);
|
||
|
dojo.lang.extend(dojo.lfx.Animation,{_startTime:null,_endTime:null,_timer:null,_percent:0,_startRepeatCount:0,play:function(_742,_743){
|
||
|
if(_743){
|
||
|
clearTimeout(this._timer);
|
||
|
this._active=false;
|
||
|
this._paused=false;
|
||
|
this._percent=0;
|
||
|
}else{
|
||
|
if(this._active&&!this._paused){
|
||
|
return this;
|
||
|
}
|
||
|
}
|
||
|
this.fire("handler",["beforeBegin"]);
|
||
|
this.fire("beforeBegin");
|
||
|
if(_742>0){
|
||
|
setTimeout(dojo.lang.hitch(this,function(){
|
||
|
this.play(null,_743);
|
||
|
}),_742);
|
||
|
return this;
|
||
|
}
|
||
|
this._startTime=new Date().valueOf();
|
||
|
if(this._paused){
|
||
|
this._startTime-=(this.duration*this._percent/100);
|
||
|
}
|
||
|
this._endTime=this._startTime+this.duration;
|
||
|
this._active=true;
|
||
|
this._paused=false;
|
||
|
var step=this._percent/100;
|
||
|
var _745=this.curve.getValue(step);
|
||
|
if(this._percent==0){
|
||
|
if(!this._startRepeatCount){
|
||
|
this._startRepeatCount=this.repeatCount;
|
||
|
}
|
||
|
this.fire("handler",["begin",_745]);
|
||
|
this.fire("onBegin",[_745]);
|
||
|
}
|
||
|
this.fire("handler",["play",_745]);
|
||
|
this.fire("onPlay",[_745]);
|
||
|
this._cycle();
|
||
|
return this;
|
||
|
},pause:function(){
|
||
|
clearTimeout(this._timer);
|
||
|
if(!this._active){
|
||
|
return this;
|
||
|
}
|
||
|
this._paused=true;
|
||
|
var _746=this.curve.getValue(this._percent/100);
|
||
|
this.fire("handler",["pause",_746]);
|
||
|
this.fire("onPause",[_746]);
|
||
|
return this;
|
||
|
},gotoPercent:function(pct,_748){
|
||
|
clearTimeout(this._timer);
|
||
|
this._active=true;
|
||
|
this._paused=true;
|
||
|
this._percent=pct;
|
||
|
if(_748){
|
||
|
this.play();
|
||
|
}
|
||
|
return this;
|
||
|
},stop:function(_749){
|
||
|
clearTimeout(this._timer);
|
||
|
var step=this._percent/100;
|
||
|
if(_749){
|
||
|
step=1;
|
||
|
}
|
||
|
var _74b=this.curve.getValue(step);
|
||
|
this.fire("handler",["stop",_74b]);
|
||
|
this.fire("onStop",[_74b]);
|
||
|
this._active=false;
|
||
|
this._paused=false;
|
||
|
return this;
|
||
|
},status:function(){
|
||
|
if(this._active){
|
||
|
return this._paused?"paused":"playing";
|
||
|
}else{
|
||
|
return "stopped";
|
||
|
}
|
||
|
return this;
|
||
|
},_cycle:function(){
|
||
|
clearTimeout(this._timer);
|
||
|
if(this._active){
|
||
|
var curr=new Date().valueOf();
|
||
|
var step=(curr-this._startTime)/(this._endTime-this._startTime);
|
||
|
if(step>=1){
|
||
|
step=1;
|
||
|
this._percent=100;
|
||
|
}else{
|
||
|
this._percent=step*100;
|
||
|
}
|
||
|
if((this.easing)&&(dojo.lang.isFunction(this.easing))){
|
||
|
step=this.easing(step);
|
||
|
}
|
||
|
var _74e=this.curve.getValue(step);
|
||
|
this.fire("handler",["animate",_74e]);
|
||
|
this.fire("onAnimate",[_74e]);
|
||
|
if(step<1){
|
||
|
this._timer=setTimeout(dojo.lang.hitch(this,"_cycle"),this.rate);
|
||
|
}else{
|
||
|
this._active=false;
|
||
|
this.fire("handler",["end"]);
|
||
|
this.fire("onEnd");
|
||
|
if(this.repeatCount>0){
|
||
|
this.repeatCount--;
|
||
|
this.play(null,true);
|
||
|
}else{
|
||
|
if(this.repeatCount==-1){
|
||
|
this.play(null,true);
|
||
|
}else{
|
||
|
if(this._startRepeatCount){
|
||
|
this.repeatCount=this._startRepeatCount;
|
||
|
this._startRepeatCount=0;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return this;
|
||
|
}});
|
||
|
dojo.lfx.Combine=function(_74f){
|
||
|
dojo.lfx.IAnimation.call(this);
|
||
|
this._anims=[];
|
||
|
this._animsEnded=0;
|
||
|
var _750=arguments;
|
||
|
if(_750.length==1&&(dojo.lang.isArray(_750[0])||dojo.lang.isArrayLike(_750[0]))){
|
||
|
_750=_750[0];
|
||
|
}
|
||
|
dojo.lang.forEach(_750,function(anim){
|
||
|
this._anims.push(anim);
|
||
|
anim.connect("onEnd",dojo.lang.hitch(this,"_onAnimsEnded"));
|
||
|
},this);
|
||
|
};
|
||
|
dojo.inherits(dojo.lfx.Combine,dojo.lfx.IAnimation);
|
||
|
dojo.lang.extend(dojo.lfx.Combine,{_animsEnded:0,play:function(_752,_753){
|
||
|
if(!this._anims.length){
|
||
|
return this;
|
||
|
}
|
||
|
this.fire("beforeBegin");
|
||
|
if(_752>0){
|
||
|
setTimeout(dojo.lang.hitch(this,function(){
|
||
|
this.play(null,_753);
|
||
|
}),_752);
|
||
|
return this;
|
||
|
}
|
||
|
if(_753||this._anims[0].percent==0){
|
||
|
this.fire("onBegin");
|
||
|
}
|
||
|
this.fire("onPlay");
|
||
|
this._animsCall("play",null,_753);
|
||
|
return this;
|
||
|
},pause:function(){
|
||
|
this.fire("onPause");
|
||
|
this._animsCall("pause");
|
||
|
return this;
|
||
|
},stop:function(_754){
|
||
|
this.fire("onStop");
|
||
|
this._animsCall("stop",_754);
|
||
|
return this;
|
||
|
},_onAnimsEnded:function(){
|
||
|
this._animsEnded++;
|
||
|
if(this._animsEnded>=this._anims.length){
|
||
|
this.fire("onEnd");
|
||
|
}
|
||
|
return this;
|
||
|
},_animsCall:function(_755){
|
||
|
var args=[];
|
||
|
if(arguments.length>1){
|
||
|
for(var i=1;i<arguments.length;i++){
|
||
|
args.push(arguments[i]);
|
||
|
}
|
||
|
}
|
||
|
var _758=this;
|
||
|
dojo.lang.forEach(this._anims,function(anim){
|
||
|
anim[_755](args);
|
||
|
},_758);
|
||
|
return this;
|
||
|
}});
|
||
|
dojo.lfx.Chain=function(_75a){
|
||
|
dojo.lfx.IAnimation.call(this);
|
||
|
this._anims=[];
|
||
|
this._currAnim=-1;
|
||
|
var _75b=arguments;
|
||
|
if(_75b.length==1&&(dojo.lang.isArray(_75b[0])||dojo.lang.isArrayLike(_75b[0]))){
|
||
|
_75b=_75b[0];
|
||
|
}
|
||
|
var _75c=this;
|
||
|
dojo.lang.forEach(_75b,function(anim,i,_75f){
|
||
|
this._anims.push(anim);
|
||
|
if(i<_75f.length-1){
|
||
|
anim.connect("onEnd",dojo.lang.hitch(this,"_playNext"));
|
||
|
}else{
|
||
|
anim.connect("onEnd",dojo.lang.hitch(this,function(){
|
||
|
this.fire("onEnd");
|
||
|
}));
|
||
|
}
|
||
|
},this);
|
||
|
};
|
||
|
dojo.inherits(dojo.lfx.Chain,dojo.lfx.IAnimation);
|
||
|
dojo.lang.extend(dojo.lfx.Chain,{_currAnim:-1,play:function(_760,_761){
|
||
|
if(!this._anims.length){
|
||
|
return this;
|
||
|
}
|
||
|
if(_761||!this._anims[this._currAnim]){
|
||
|
this._currAnim=0;
|
||
|
}
|
||
|
var _762=this._anims[this._currAnim];
|
||
|
this.fire("beforeBegin");
|
||
|
if(_760>0){
|
||
|
setTimeout(dojo.lang.hitch(this,function(){
|
||
|
this.play(null,_761);
|
||
|
}),_760);
|
||
|
return this;
|
||
|
}
|
||
|
if(_762){
|
||
|
if(this._currAnim==0){
|
||
|
this.fire("handler",["begin",this._currAnim]);
|
||
|
this.fire("onBegin",[this._currAnim]);
|
||
|
}
|
||
|
this.fire("onPlay",[this._currAnim]);
|
||
|
_762.play(null,_761);
|
||
|
}
|
||
|
return this;
|
||
|
},pause:function(){
|
||
|
if(this._anims[this._currAnim]){
|
||
|
this._anims[this._currAnim].pause();
|
||
|
this.fire("onPause",[this._currAnim]);
|
||
|
}
|
||
|
return this;
|
||
|
},playPause:function(){
|
||
|
if(this._anims.length==0){
|
||
|
return this;
|
||
|
}
|
||
|
if(this._currAnim==-1){
|
||
|
this._currAnim=0;
|
||
|
}
|
||
|
var _763=this._anims[this._currAnim];
|
||
|
if(_763){
|
||
|
if(!_763._active||_763._paused){
|
||
|
this.play();
|
||
|
}else{
|
||
|
this.pause();
|
||
|
}
|
||
|
}
|
||
|
return this;
|
||
|
},stop:function(){
|
||
|
var _764=this._anims[this._currAnim];
|
||
|
if(_764){
|
||
|
_764.stop();
|
||
|
this.fire("onStop",[this._currAnim]);
|
||
|
}
|
||
|
return _764;
|
||
|
},_playNext:function(){
|
||
|
if(this._currAnim==-1||this._anims.length==0){
|
||
|
return this;
|
||
|
}
|
||
|
this._currAnim++;
|
||
|
if(this._anims[this._currAnim]){
|
||
|
this._anims[this._currAnim].play(null,true);
|
||
|
}
|
||
|
return this;
|
||
|
}});
|
||
|
dojo.lfx.combine=function(_765){
|
||
|
var _766=arguments;
|
||
|
if(dojo.lang.isArray(arguments[0])){
|
||
|
_766=arguments[0];
|
||
|
}
|
||
|
if(_766.length==1){
|
||
|
return _766[0];
|
||
|
}
|
||
|
return new dojo.lfx.Combine(_766);
|
||
|
};
|
||
|
dojo.lfx.chain=function(_767){
|
||
|
var _768=arguments;
|
||
|
if(dojo.lang.isArray(arguments[0])){
|
||
|
_768=arguments[0];
|
||
|
}
|
||
|
if(_768.length==1){
|
||
|
return _768[0];
|
||
|
}
|
||
|
return new dojo.lfx.Chain(_768);
|
||
|
};
|
||
|
dojo.provide("dojo.html.color");
|
||
|
dojo.html.getBackgroundColor=function(node){
|
||
|
node=dojo.byId(node);
|
||
|
var _76a;
|
||
|
do{
|
||
|
_76a=dojo.html.getStyle(node,"background-color");
|
||
|
if(_76a.toLowerCase()=="rgba(0, 0, 0, 0)"){
|
||
|
_76a="transparent";
|
||
|
}
|
||
|
if(node==document.getElementsByTagName("body")[0]){
|
||
|
node=null;
|
||
|
break;
|
||
|
}
|
||
|
node=node.parentNode;
|
||
|
}while(node&&dojo.lang.inArray(["transparent",""],_76a));
|
||
|
if(_76a=="transparent"){
|
||
|
_76a=[255,255,255,0];
|
||
|
}else{
|
||
|
_76a=dojo.gfx.color.extractRGB(_76a);
|
||
|
}
|
||
|
return _76a;
|
||
|
};
|
||
|
dojo.provide("dojo.lfx.html");
|
||
|
dojo.lfx.html._byId=function(_76b){
|
||
|
if(!_76b){
|
||
|
return [];
|
||
|
}
|
||
|
if(dojo.lang.isArrayLike(_76b)){
|
||
|
if(!_76b.alreadyChecked){
|
||
|
var n=[];
|
||
|
dojo.lang.forEach(_76b,function(node){
|
||
|
n.push(dojo.byId(node));
|
||
|
});
|
||
|
n.alreadyChecked=true;
|
||
|
return n;
|
||
|
}else{
|
||
|
return _76b;
|
||
|
}
|
||
|
}else{
|
||
|
var n=[];
|
||
|
n.push(dojo.byId(_76b));
|
||
|
n.alreadyChecked=true;
|
||
|
return n;
|
||
|
}
|
||
|
};
|
||
|
dojo.lfx.html.propertyAnimation=function(_76e,_76f,_770,_771,_772){
|
||
|
_76e=dojo.lfx.html._byId(_76e);
|
||
|
var _773={"propertyMap":_76f,"nodes":_76e,"duration":_770,"easing":_771||dojo.lfx.easeDefault};
|
||
|
var _774=function(args){
|
||
|
if(args.nodes.length==1){
|
||
|
var pm=args.propertyMap;
|
||
|
if(!dojo.lang.isArray(args.propertyMap)){
|
||
|
var parr=[];
|
||
|
for(var _778 in pm){
|
||
|
pm[_778].property=_778;
|
||
|
parr.push(pm[_778]);
|
||
|
}
|
||
|
pm=args.propertyMap=parr;
|
||
|
}
|
||
|
dojo.lang.forEach(pm,function(prop){
|
||
|
if(dj_undef("start",prop)){
|
||
|
if(prop.property!="opacity"){
|
||
|
prop.start=parseInt(dojo.html.getComputedStyle(args.nodes[0],prop.property));
|
||
|
}else{
|
||
|
prop.start=dojo.html.getOpacity(args.nodes[0]);
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
};
|
||
|
var _77a=function(_77b){
|
||
|
var _77c=[];
|
||
|
dojo.lang.forEach(_77b,function(c){
|
||
|
_77c.push(Math.round(c));
|
||
|
});
|
||
|
return _77c;
|
||
|
};
|
||
|
var _77e=function(n,_780){
|
||
|
n=dojo.byId(n);
|
||
|
if(!n||!n.style){
|
||
|
return;
|
||
|
}
|
||
|
for(var s in _780){
|
||
|
try{
|
||
|
if(s=="opacity"){
|
||
|
dojo.html.setOpacity(n,_780[s]);
|
||
|
}else{
|
||
|
n.style[s]=_780[s];
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug(e);
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
var _782=function(_783){
|
||
|
this._properties=_783;
|
||
|
this.diffs=new Array(_783.length);
|
||
|
dojo.lang.forEach(_783,function(prop,i){
|
||
|
if(dojo.lang.isFunction(prop.start)){
|
||
|
prop.start=prop.start(prop,i);
|
||
|
}
|
||
|
if(dojo.lang.isFunction(prop.end)){
|
||
|
prop.end=prop.end(prop,i);
|
||
|
}
|
||
|
if(dojo.lang.isArray(prop.start)){
|
||
|
this.diffs[i]=null;
|
||
|
}else{
|
||
|
if(prop.start instanceof dojo.gfx.color.Color){
|
||
|
prop.startRgb=prop.start.toRgb();
|
||
|
prop.endRgb=prop.end.toRgb();
|
||
|
}else{
|
||
|
this.diffs[i]=prop.end-prop.start;
|
||
|
}
|
||
|
}
|
||
|
},this);
|
||
|
this.getValue=function(n){
|
||
|
var ret={};
|
||
|
dojo.lang.forEach(this._properties,function(prop,i){
|
||
|
var _78a=null;
|
||
|
if(dojo.lang.isArray(prop.start)){
|
||
|
}else{
|
||
|
if(prop.start instanceof dojo.gfx.color.Color){
|
||
|
_78a=(prop.units||"rgb")+"(";
|
||
|
for(var j=0;j<prop.startRgb.length;j++){
|
||
|
_78a+=Math.round(((prop.endRgb[j]-prop.startRgb[j])*n)+prop.startRgb[j])+(j<prop.startRgb.length-1?",":"");
|
||
|
}
|
||
|
_78a+=")";
|
||
|
}else{
|
||
|
_78a=((this.diffs[i])*n)+prop.start+(prop.property!="opacity"?prop.units||"px":"");
|
||
|
}
|
||
|
}
|
||
|
ret[dojo.html.toCamelCase(prop.property)]=_78a;
|
||
|
},this);
|
||
|
return ret;
|
||
|
};
|
||
|
};
|
||
|
var anim=new dojo.lfx.Animation({beforeBegin:function(){
|
||
|
_774(_773);
|
||
|
anim.curve=new _782(_773.propertyMap);
|
||
|
},onAnimate:function(_78d){
|
||
|
dojo.lang.forEach(_773.nodes,function(node){
|
||
|
_77e(node,_78d);
|
||
|
});
|
||
|
}},_773.duration,null,_773.easing);
|
||
|
if(_772){
|
||
|
for(var x in _772){
|
||
|
if(dojo.lang.isFunction(_772[x])){
|
||
|
anim.connect(x,anim,_772[x]);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return anim;
|
||
|
};
|
||
|
dojo.lfx.html._makeFadeable=function(_790){
|
||
|
var _791=function(node){
|
||
|
if(dojo.render.html.ie){
|
||
|
if((node.style.zoom.length==0)&&(dojo.html.getStyle(node,"zoom")=="normal")){
|
||
|
node.style.zoom="1";
|
||
|
}
|
||
|
if((node.style.width.length==0)&&(dojo.html.getStyle(node,"width")=="auto")){
|
||
|
node.style.width="auto";
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
if(dojo.lang.isArrayLike(_790)){
|
||
|
dojo.lang.forEach(_790,_791);
|
||
|
}else{
|
||
|
_791(_790);
|
||
|
}
|
||
|
};
|
||
|
dojo.lfx.html.fade=function(_793,_794,_795,_796,_797){
|
||
|
_793=dojo.lfx.html._byId(_793);
|
||
|
var _798={property:"opacity"};
|
||
|
if(!dj_undef("start",_794)){
|
||
|
_798.start=_794.start;
|
||
|
}else{
|
||
|
_798.start=function(){
|
||
|
return dojo.html.getOpacity(_793[0]);
|
||
|
};
|
||
|
}
|
||
|
if(!dj_undef("end",_794)){
|
||
|
_798.end=_794.end;
|
||
|
}else{
|
||
|
dojo.raise("dojo.lfx.html.fade needs an end value");
|
||
|
}
|
||
|
var anim=dojo.lfx.propertyAnimation(_793,[_798],_795,_796);
|
||
|
anim.connect("beforeBegin",function(){
|
||
|
dojo.lfx.html._makeFadeable(_793);
|
||
|
});
|
||
|
if(_797){
|
||
|
anim.connect("onEnd",function(){
|
||
|
_797(_793,anim);
|
||
|
});
|
||
|
}
|
||
|
return anim;
|
||
|
};
|
||
|
dojo.lfx.html.fadeIn=function(_79a,_79b,_79c,_79d){
|
||
|
return dojo.lfx.html.fade(_79a,{end:1},_79b,_79c,_79d);
|
||
|
};
|
||
|
dojo.lfx.html.fadeOut=function(_79e,_79f,_7a0,_7a1){
|
||
|
return dojo.lfx.html.fade(_79e,{end:0},_79f,_7a0,_7a1);
|
||
|
};
|
||
|
dojo.lfx.html.fadeShow=function(_7a2,_7a3,_7a4,_7a5){
|
||
|
_7a2=dojo.lfx.html._byId(_7a2);
|
||
|
dojo.lang.forEach(_7a2,function(node){
|
||
|
dojo.html.setOpacity(node,0);
|
||
|
});
|
||
|
var anim=dojo.lfx.html.fadeIn(_7a2,_7a3,_7a4,_7a5);
|
||
|
anim.connect("beforeBegin",function(){
|
||
|
if(dojo.lang.isArrayLike(_7a2)){
|
||
|
dojo.lang.forEach(_7a2,dojo.html.show);
|
||
|
}else{
|
||
|
dojo.html.show(_7a2);
|
||
|
}
|
||
|
});
|
||
|
return anim;
|
||
|
};
|
||
|
dojo.lfx.html.fadeHide=function(_7a8,_7a9,_7aa,_7ab){
|
||
|
var anim=dojo.lfx.html.fadeOut(_7a8,_7a9,_7aa,function(){
|
||
|
if(dojo.lang.isArrayLike(_7a8)){
|
||
|
dojo.lang.forEach(_7a8,dojo.html.hide);
|
||
|
}else{
|
||
|
dojo.html.hide(_7a8);
|
||
|
}
|
||
|
if(_7ab){
|
||
|
_7ab(_7a8,anim);
|
||
|
}
|
||
|
});
|
||
|
return anim;
|
||
|
};
|
||
|
dojo.lfx.html.wipeIn=function(_7ad,_7ae,_7af,_7b0){
|
||
|
_7ad=dojo.lfx.html._byId(_7ad);
|
||
|
var _7b1=[];
|
||
|
dojo.lang.forEach(_7ad,function(node){
|
||
|
var _7b3={};
|
||
|
var _7b4,_7b5,_7b6;
|
||
|
with(node.style){
|
||
|
_7b4=top;
|
||
|
_7b5=left;
|
||
|
_7b6=position;
|
||
|
top="-9999px";
|
||
|
left="-9999px";
|
||
|
position="absolute";
|
||
|
display="";
|
||
|
}
|
||
|
var _7b7=dojo.html.getBorderBox(node).height;
|
||
|
with(node.style){
|
||
|
top=_7b4;
|
||
|
left=_7b5;
|
||
|
position=_7b6;
|
||
|
display="none";
|
||
|
}
|
||
|
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:1,end:function(){
|
||
|
return _7b7;
|
||
|
}}},_7ae,_7af);
|
||
|
anim.connect("beforeBegin",function(){
|
||
|
_7b3.overflow=node.style.overflow;
|
||
|
_7b3.height=node.style.height;
|
||
|
with(node.style){
|
||
|
overflow="hidden";
|
||
|
height="1px";
|
||
|
}
|
||
|
dojo.html.show(node);
|
||
|
});
|
||
|
anim.connect("onEnd",function(){
|
||
|
with(node.style){
|
||
|
overflow=_7b3.overflow;
|
||
|
height=_7b3.height;
|
||
|
}
|
||
|
if(_7b0){
|
||
|
_7b0(node,anim);
|
||
|
}
|
||
|
});
|
||
|
_7b1.push(anim);
|
||
|
});
|
||
|
return dojo.lfx.combine(_7b1);
|
||
|
};
|
||
|
dojo.lfx.html.wipeOut=function(_7b9,_7ba,_7bb,_7bc){
|
||
|
_7b9=dojo.lfx.html._byId(_7b9);
|
||
|
var _7bd=[];
|
||
|
dojo.lang.forEach(_7b9,function(node){
|
||
|
var _7bf={};
|
||
|
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:function(){
|
||
|
return dojo.html.getContentBox(node).height;
|
||
|
},end:1}},_7ba,_7bb,{"beforeBegin":function(){
|
||
|
_7bf.overflow=node.style.overflow;
|
||
|
_7bf.height=node.style.height;
|
||
|
with(node.style){
|
||
|
overflow="hidden";
|
||
|
}
|
||
|
dojo.html.show(node);
|
||
|
},"onEnd":function(){
|
||
|
dojo.html.hide(node);
|
||
|
with(node.style){
|
||
|
overflow=_7bf.overflow;
|
||
|
height=_7bf.height;
|
||
|
}
|
||
|
if(_7bc){
|
||
|
_7bc(node,anim);
|
||
|
}
|
||
|
}});
|
||
|
_7bd.push(anim);
|
||
|
});
|
||
|
return dojo.lfx.combine(_7bd);
|
||
|
};
|
||
|
dojo.lfx.html.slideTo=function(_7c1,_7c2,_7c3,_7c4,_7c5){
|
||
|
_7c1=dojo.lfx.html._byId(_7c1);
|
||
|
var _7c6=[];
|
||
|
var _7c7=dojo.html.getComputedStyle;
|
||
|
if(dojo.lang.isArray(_7c2)){
|
||
|
dojo.deprecated("dojo.lfx.html.slideTo(node, array)","use dojo.lfx.html.slideTo(node, {top: value, left: value});","0.5");
|
||
|
_7c2={top:_7c2[0],left:_7c2[1]};
|
||
|
}
|
||
|
dojo.lang.forEach(_7c1,function(node){
|
||
|
var top=null;
|
||
|
var left=null;
|
||
|
var init=(function(){
|
||
|
var _7cc=node;
|
||
|
return function(){
|
||
|
var pos=_7c7(_7cc,"position");
|
||
|
top=(pos=="absolute"?node.offsetTop:parseInt(_7c7(node,"top"))||0);
|
||
|
left=(pos=="absolute"?node.offsetLeft:parseInt(_7c7(node,"left"))||0);
|
||
|
if(!dojo.lang.inArray(["absolute","relative"],pos)){
|
||
|
var ret=dojo.html.abs(_7cc,true);
|
||
|
dojo.html.setStyleAttributes(_7cc,"position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;");
|
||
|
top=ret.y;
|
||
|
left=ret.x;
|
||
|
}
|
||
|
};
|
||
|
})();
|
||
|
init();
|
||
|
var anim=dojo.lfx.propertyAnimation(node,{"top":{start:top,end:(_7c2.top||0)},"left":{start:left,end:(_7c2.left||0)}},_7c3,_7c4,{"beforeBegin":init});
|
||
|
if(_7c5){
|
||
|
anim.connect("onEnd",function(){
|
||
|
_7c5(_7c1,anim);
|
||
|
});
|
||
|
}
|
||
|
_7c6.push(anim);
|
||
|
});
|
||
|
return dojo.lfx.combine(_7c6);
|
||
|
};
|
||
|
dojo.lfx.html.slideBy=function(_7d0,_7d1,_7d2,_7d3,_7d4){
|
||
|
_7d0=dojo.lfx.html._byId(_7d0);
|
||
|
var _7d5=[];
|
||
|
var _7d6=dojo.html.getComputedStyle;
|
||
|
if(dojo.lang.isArray(_7d1)){
|
||
|
dojo.deprecated("dojo.lfx.html.slideBy(node, array)","use dojo.lfx.html.slideBy(node, {top: value, left: value});","0.5");
|
||
|
_7d1={top:_7d1[0],left:_7d1[1]};
|
||
|
}
|
||
|
dojo.lang.forEach(_7d0,function(node){
|
||
|
var top=null;
|
||
|
var left=null;
|
||
|
var init=(function(){
|
||
|
var _7db=node;
|
||
|
return function(){
|
||
|
var pos=_7d6(_7db,"position");
|
||
|
top=(pos=="absolute"?node.offsetTop:parseInt(_7d6(node,"top"))||0);
|
||
|
left=(pos=="absolute"?node.offsetLeft:parseInt(_7d6(node,"left"))||0);
|
||
|
if(!dojo.lang.inArray(["absolute","relative"],pos)){
|
||
|
var ret=dojo.html.abs(_7db,true);
|
||
|
dojo.html.setStyleAttributes(_7db,"position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;");
|
||
|
top=ret.y;
|
||
|
left=ret.x;
|
||
|
}
|
||
|
};
|
||
|
})();
|
||
|
init();
|
||
|
var anim=dojo.lfx.propertyAnimation(node,{"top":{start:top,end:top+(_7d1.top||0)},"left":{start:left,end:left+(_7d1.left||0)}},_7d2,_7d3).connect("beforeBegin",init);
|
||
|
if(_7d4){
|
||
|
anim.connect("onEnd",function(){
|
||
|
_7d4(_7d0,anim);
|
||
|
});
|
||
|
}
|
||
|
_7d5.push(anim);
|
||
|
});
|
||
|
return dojo.lfx.combine(_7d5);
|
||
|
};
|
||
|
dojo.lfx.html.explode=function(_7df,_7e0,_7e1,_7e2,_7e3){
|
||
|
var h=dojo.html;
|
||
|
_7df=dojo.byId(_7df);
|
||
|
_7e0=dojo.byId(_7e0);
|
||
|
var _7e5=h.toCoordinateObject(_7df,true);
|
||
|
var _7e6=document.createElement("div");
|
||
|
h.copyStyle(_7e6,_7e0);
|
||
|
if(_7e0.explodeClassName){
|
||
|
_7e6.className=_7e0.explodeClassName;
|
||
|
}
|
||
|
with(_7e6.style){
|
||
|
position="absolute";
|
||
|
display="none";
|
||
|
var _7e7=h.getStyle(_7df,"background-color");
|
||
|
backgroundColor=_7e7?_7e7.toLowerCase():"transparent";
|
||
|
backgroundColor=(backgroundColor=="transparent")?"rgb(221, 221, 221)":backgroundColor;
|
||
|
}
|
||
|
dojo.body().appendChild(_7e6);
|
||
|
with(_7e0.style){
|
||
|
visibility="hidden";
|
||
|
display="block";
|
||
|
}
|
||
|
var _7e8=h.toCoordinateObject(_7e0,true);
|
||
|
with(_7e0.style){
|
||
|
display="none";
|
||
|
visibility="visible";
|
||
|
}
|
||
|
var _7e9={opacity:{start:0.5,end:1}};
|
||
|
dojo.lang.forEach(["height","width","top","left"],function(type){
|
||
|
_7e9[type]={start:_7e5[type],end:_7e8[type]};
|
||
|
});
|
||
|
var anim=new dojo.lfx.propertyAnimation(_7e6,_7e9,_7e1,_7e2,{"beforeBegin":function(){
|
||
|
h.setDisplay(_7e6,"block");
|
||
|
},"onEnd":function(){
|
||
|
h.setDisplay(_7e0,"block");
|
||
|
_7e6.parentNode.removeChild(_7e6);
|
||
|
}});
|
||
|
if(_7e3){
|
||
|
anim.connect("onEnd",function(){
|
||
|
_7e3(_7e0,anim);
|
||
|
});
|
||
|
}
|
||
|
return anim;
|
||
|
};
|
||
|
dojo.lfx.html.implode=function(_7ec,end,_7ee,_7ef,_7f0){
|
||
|
var h=dojo.html;
|
||
|
_7ec=dojo.byId(_7ec);
|
||
|
end=dojo.byId(end);
|
||
|
var _7f2=dojo.html.toCoordinateObject(_7ec,true);
|
||
|
var _7f3=dojo.html.toCoordinateObject(end,true);
|
||
|
var _7f4=document.createElement("div");
|
||
|
dojo.html.copyStyle(_7f4,_7ec);
|
||
|
if(_7ec.explodeClassName){
|
||
|
_7f4.className=_7ec.explodeClassName;
|
||
|
}
|
||
|
dojo.html.setOpacity(_7f4,0.3);
|
||
|
with(_7f4.style){
|
||
|
position="absolute";
|
||
|
display="none";
|
||
|
backgroundColor=h.getStyle(_7ec,"background-color").toLowerCase();
|
||
|
}
|
||
|
dojo.body().appendChild(_7f4);
|
||
|
var _7f5={opacity:{start:1,end:0.5}};
|
||
|
dojo.lang.forEach(["height","width","top","left"],function(type){
|
||
|
_7f5[type]={start:_7f2[type],end:_7f3[type]};
|
||
|
});
|
||
|
var anim=new dojo.lfx.propertyAnimation(_7f4,_7f5,_7ee,_7ef,{"beforeBegin":function(){
|
||
|
dojo.html.hide(_7ec);
|
||
|
dojo.html.show(_7f4);
|
||
|
},"onEnd":function(){
|
||
|
_7f4.parentNode.removeChild(_7f4);
|
||
|
}});
|
||
|
if(_7f0){
|
||
|
anim.connect("onEnd",function(){
|
||
|
_7f0(_7ec,anim);
|
||
|
});
|
||
|
}
|
||
|
return anim;
|
||
|
};
|
||
|
dojo.lfx.html.highlight=function(_7f8,_7f9,_7fa,_7fb,_7fc){
|
||
|
_7f8=dojo.lfx.html._byId(_7f8);
|
||
|
var _7fd=[];
|
||
|
dojo.lang.forEach(_7f8,function(node){
|
||
|
var _7ff=dojo.html.getBackgroundColor(node);
|
||
|
var bg=dojo.html.getStyle(node,"background-color").toLowerCase();
|
||
|
var _801=dojo.html.getStyle(node,"background-image");
|
||
|
var _802=(bg=="transparent"||bg=="rgba(0, 0, 0, 0)");
|
||
|
while(_7ff.length>3){
|
||
|
_7ff.pop();
|
||
|
}
|
||
|
var rgb=new dojo.gfx.color.Color(_7f9);
|
||
|
var _804=new dojo.gfx.color.Color(_7ff);
|
||
|
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:rgb,end:_804}},_7fa,_7fb,{"beforeBegin":function(){
|
||
|
if(_801){
|
||
|
node.style.backgroundImage="none";
|
||
|
}
|
||
|
node.style.backgroundColor="rgb("+rgb.toRgb().join(",")+")";
|
||
|
},"onEnd":function(){
|
||
|
if(_801){
|
||
|
node.style.backgroundImage=_801;
|
||
|
}
|
||
|
if(_802){
|
||
|
node.style.backgroundColor="transparent";
|
||
|
}
|
||
|
if(_7fc){
|
||
|
_7fc(node,anim);
|
||
|
}
|
||
|
}});
|
||
|
_7fd.push(anim);
|
||
|
});
|
||
|
return dojo.lfx.combine(_7fd);
|
||
|
};
|
||
|
dojo.lfx.html.unhighlight=function(_806,_807,_808,_809,_80a){
|
||
|
_806=dojo.lfx.html._byId(_806);
|
||
|
var _80b=[];
|
||
|
dojo.lang.forEach(_806,function(node){
|
||
|
var _80d=new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node));
|
||
|
var rgb=new dojo.gfx.color.Color(_807);
|
||
|
var _80f=dojo.html.getStyle(node,"background-image");
|
||
|
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:_80d,end:rgb}},_808,_809,{"beforeBegin":function(){
|
||
|
if(_80f){
|
||
|
node.style.backgroundImage="none";
|
||
|
}
|
||
|
node.style.backgroundColor="rgb("+_80d.toRgb().join(",")+")";
|
||
|
},"onEnd":function(){
|
||
|
if(_80a){
|
||
|
_80a(node,anim);
|
||
|
}
|
||
|
}});
|
||
|
_80b.push(anim);
|
||
|
});
|
||
|
return dojo.lfx.combine(_80b);
|
||
|
};
|
||
|
dojo.lang.mixin(dojo.lfx,dojo.lfx.html);
|
||
|
dojo.kwCompoundRequire({browser:["dojo.lfx.html"],dashboard:["dojo.lfx.html"]});
|
||
|
dojo.provide("dojo.lfx.*");
|
||
|
dojo.provide("dojo.lfx.toggle");
|
||
|
dojo.lfx.toggle.plain={show:function(node,_812,_813,_814){
|
||
|
dojo.html.show(node);
|
||
|
if(dojo.lang.isFunction(_814)){
|
||
|
_814();
|
||
|
}
|
||
|
},hide:function(node,_816,_817,_818){
|
||
|
dojo.html.hide(node);
|
||
|
if(dojo.lang.isFunction(_818)){
|
||
|
_818();
|
||
|
}
|
||
|
}};
|
||
|
dojo.lfx.toggle.fade={show:function(node,_81a,_81b,_81c){
|
||
|
dojo.lfx.fadeShow(node,_81a,_81b,_81c).play();
|
||
|
},hide:function(node,_81e,_81f,_820){
|
||
|
dojo.lfx.fadeHide(node,_81e,_81f,_820).play();
|
||
|
}};
|
||
|
dojo.lfx.toggle.wipe={show:function(node,_822,_823,_824){
|
||
|
dojo.lfx.wipeIn(node,_822,_823,_824).play();
|
||
|
},hide:function(node,_826,_827,_828){
|
||
|
dojo.lfx.wipeOut(node,_826,_827,_828).play();
|
||
|
}};
|
||
|
dojo.lfx.toggle.explode={show:function(node,_82a,_82b,_82c,_82d){
|
||
|
dojo.lfx.explode(_82d||{x:0,y:0,width:0,height:0},node,_82a,_82b,_82c).play();
|
||
|
},hide:function(node,_82f,_830,_831,_832){
|
||
|
dojo.lfx.implode(node,_832||{x:0,y:0,width:0,height:0},_82f,_830,_831).play();
|
||
|
}};
|
||
|
dojo.provide("dojo.widget.HtmlWidget");
|
||
|
dojo.declare("dojo.widget.HtmlWidget",dojo.widget.DomWidget,{templateCssPath:null,templatePath:null,lang:"",toggle:"plain",toggleDuration:150,initialize:function(args,frag){
|
||
|
},postMixInProperties:function(args,frag){
|
||
|
if(this.lang===""){
|
||
|
this.lang=null;
|
||
|
}
|
||
|
this.toggleObj=dojo.lfx.toggle[this.toggle.toLowerCase()]||dojo.lfx.toggle.plain;
|
||
|
},createNodesFromText:function(txt,wrap){
|
||
|
return dojo.html.createNodesFromText(txt,wrap);
|
||
|
},destroyRendering:function(_839){
|
||
|
try{
|
||
|
if(this.bgIframe){
|
||
|
this.bgIframe.remove();
|
||
|
delete this.bgIframe;
|
||
|
}
|
||
|
if(!_839&&this.domNode){
|
||
|
dojo.event.browser.clean(this.domNode);
|
||
|
}
|
||
|
dojo.widget.HtmlWidget.superclass.destroyRendering.call(this);
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
},isShowing:function(){
|
||
|
return dojo.html.isShowing(this.domNode);
|
||
|
},toggleShowing:function(){
|
||
|
if(this.isShowing()){
|
||
|
this.hide();
|
||
|
}else{
|
||
|
this.show();
|
||
|
}
|
||
|
},show:function(){
|
||
|
if(this.isShowing()){
|
||
|
return;
|
||
|
}
|
||
|
this.animationInProgress=true;
|
||
|
this.toggleObj.show(this.domNode,this.toggleDuration,null,dojo.lang.hitch(this,this.onShow),this.explodeSrc);
|
||
|
},onShow:function(){
|
||
|
this.animationInProgress=false;
|
||
|
this.checkSize();
|
||
|
},hide:function(){
|
||
|
if(!this.isShowing()){
|
||
|
return;
|
||
|
}
|
||
|
this.animationInProgress=true;
|
||
|
this.toggleObj.hide(this.domNode,this.toggleDuration,null,dojo.lang.hitch(this,this.onHide),this.explodeSrc);
|
||
|
},onHide:function(){
|
||
|
this.animationInProgress=false;
|
||
|
},_isResized:function(w,h){
|
||
|
if(!this.isShowing()){
|
||
|
return false;
|
||
|
}
|
||
|
var wh=dojo.html.getMarginBox(this.domNode);
|
||
|
var _83d=w||wh.width;
|
||
|
var _83e=h||wh.height;
|
||
|
if(this.width==_83d&&this.height==_83e){
|
||
|
return false;
|
||
|
}
|
||
|
this.width=_83d;
|
||
|
this.height=_83e;
|
||
|
return true;
|
||
|
},checkSize:function(){
|
||
|
if(!this._isResized()){
|
||
|
return;
|
||
|
}
|
||
|
this.onResized();
|
||
|
},resizeTo:function(w,h){
|
||
|
dojo.html.setMarginBox(this.domNode,{width:w,height:h});
|
||
|
if(this.isShowing()){
|
||
|
this.onResized();
|
||
|
}
|
||
|
},resizeSoon:function(){
|
||
|
if(this.isShowing()){
|
||
|
dojo.lang.setTimeout(this,this.onResized,0);
|
||
|
}
|
||
|
},onResized:function(){
|
||
|
dojo.lang.forEach(this.children,function(_841){
|
||
|
if(_841.checkSize){
|
||
|
_841.checkSize();
|
||
|
}
|
||
|
});
|
||
|
}});
|
||
|
dojo.kwCompoundRequire({common:["dojo.xml.Parse","dojo.widget.Widget","dojo.widget.Parse","dojo.widget.Manager"],browser:["dojo.widget.DomWidget","dojo.widget.HtmlWidget"],dashboard:["dojo.widget.DomWidget","dojo.widget.HtmlWidget"],svg:["dojo.widget.SvgWidget"],rhino:["dojo.widget.SwtWidget"]});
|
||
|
dojo.provide("dojo.widget.*");
|
||
|
dojo.kwCompoundRequire({common:["dojo.html.common","dojo.html.style"]});
|
||
|
dojo.provide("dojo.html.*");
|
||
|
dojo.provide("dojo.widget.TreeNodeV3");
|
||
|
dojo.widget.defineWidget("dojo.widget.TreeNodeV3",[dojo.widget.HtmlWidget,dojo.widget.TreeWithNode],function(){
|
||
|
this.actionsDisabled=[];
|
||
|
this.object={};
|
||
|
},{tryLazyInit:true,actions:{MOVE:"MOVE",DETACH:"DETACH",EDIT:"EDIT",ADDCHILD:"ADDCHILD",SELECT:"SELECT"},labelClass:"",contentClass:"",expandNode:null,labelNode:null,nodeDocType:"",selected:false,getnodeDocType:function(){
|
||
|
return this.nodeDocType;
|
||
|
},cloneProperties:["actionsDisabled","tryLazyInit","nodeDocType","objectId","object","title","isFolder","isExpanded","state"],clone:function(deep){
|
||
|
var ret=new this.constructor();
|
||
|
for(var i=0;i<this.cloneProperties.length;i++){
|
||
|
var prop=this.cloneProperties[i];
|
||
|
ret[prop]=dojo.lang.shallowCopy(this[prop],true);
|
||
|
}
|
||
|
if(this.tree.unsetFolderOnEmpty&&!deep&&this.isFolder){
|
||
|
ret.isFolder=false;
|
||
|
}
|
||
|
ret.toggleObj=this.toggleObj;
|
||
|
dojo.widget.manager.add(ret);
|
||
|
ret.tree=this.tree;
|
||
|
ret.buildRendering({},{});
|
||
|
ret.initialize({},{});
|
||
|
if(deep&&this.children.length){
|
||
|
for(var i=0;i<this.children.length;i++){
|
||
|
var _846=this.children[i];
|
||
|
if(_846.clone){
|
||
|
ret.children.push(_846.clone(deep));
|
||
|
}else{
|
||
|
ret.children.push(dojo.lang.shallowCopy(_846,deep));
|
||
|
}
|
||
|
}
|
||
|
ret.setChildren();
|
||
|
}
|
||
|
return ret;
|
||
|
},markProcessing:function(){
|
||
|
this.markProcessingSavedClass=dojo.html.getClass(this.expandNode);
|
||
|
dojo.html.setClass(this.expandNode,this.tree.classPrefix+"ExpandLoading");
|
||
|
},unmarkProcessing:function(){
|
||
|
dojo.html.setClass(this.expandNode,this.markProcessingSavedClass);
|
||
|
},buildRendering:function(args,_848,_849){
|
||
|
if(args.tree){
|
||
|
this.tree=dojo.lang.isString(args.tree)?dojo.widget.manager.getWidgetById(args.tree):args.tree;
|
||
|
}else{
|
||
|
if(_849&&_849.tree){
|
||
|
this.tree=_849.tree;
|
||
|
}
|
||
|
}
|
||
|
if(!this.tree){
|
||
|
dojo.raise("Can't evaluate tree from arguments or parent");
|
||
|
}
|
||
|
this.domNode=this.tree.nodeTemplate.cloneNode(true);
|
||
|
this.expandNode=this.domNode.firstChild;
|
||
|
this.contentNode=this.domNode.childNodes[1];
|
||
|
this.labelNode=this.contentNode.firstChild;
|
||
|
if(this.labelClass){
|
||
|
dojo.html.addClass(this.labelNode,this.labelClass);
|
||
|
}
|
||
|
if(this.contentClass){
|
||
|
dojo.html.addClass(this.contentNode,this.contentClass);
|
||
|
}
|
||
|
this.domNode.widgetId=this.widgetId;
|
||
|
this.labelNode.innerHTML=this.title;
|
||
|
},isTreeNode:true,object:{},title:"",isFolder:null,contentNode:null,expandClass:"",isExpanded:false,containerNode:null,getInfo:function(){
|
||
|
var info={widgetId:this.widgetId,objectId:this.objectId,index:this.getParentIndex()};
|
||
|
return info;
|
||
|
},setFolder:function(){
|
||
|
this.isFolder=true;
|
||
|
this.viewSetExpand();
|
||
|
if(!this.containerNode){
|
||
|
this.viewAddContainer();
|
||
|
}
|
||
|
dojo.event.topic.publish(this.tree.eventNames.afterSetFolder,{source:this});
|
||
|
},initialize:function(args,frag,_84d){
|
||
|
if(args.isFolder){
|
||
|
this.isFolder=true;
|
||
|
}
|
||
|
if(this.children.length||this.isFolder){
|
||
|
this.setFolder();
|
||
|
}else{
|
||
|
this.viewSetExpand();
|
||
|
}
|
||
|
for(var i=0;i<this.actionsDisabled.length;i++){
|
||
|
this.actionsDisabled[i]=this.actionsDisabled[i].toUpperCase();
|
||
|
}
|
||
|
dojo.event.topic.publish(this.tree.eventNames.afterChangeTree,{oldTree:null,newTree:this.tree,node:this});
|
||
|
},unsetFolder:function(){
|
||
|
this.isFolder=false;
|
||
|
this.viewSetExpand();
|
||
|
dojo.event.topic.publish(this.tree.eventNames.afterUnsetFolder,{source:this});
|
||
|
},insertNode:function(_84f,_850){
|
||
|
if(!_850){
|
||
|
_850=0;
|
||
|
}
|
||
|
if(_850==0){
|
||
|
dojo.html.prependChild(this.domNode,_84f.containerNode);
|
||
|
}else{
|
||
|
dojo.html.insertAfter(this.domNode,_84f.children[_850-1].domNode);
|
||
|
}
|
||
|
},updateTree:function(_851){
|
||
|
if(this.tree===_851){
|
||
|
return;
|
||
|
}
|
||
|
var _852=this.tree;
|
||
|
dojo.lang.forEach(this.getDescendants(),function(elem){
|
||
|
elem.tree=_851;
|
||
|
});
|
||
|
if(_852.classPrefix!=_851.classPrefix){
|
||
|
var _854=[this.domNode];
|
||
|
var elem;
|
||
|
var reg=new RegExp("(^|\\s)"+_852.classPrefix,"g");
|
||
|
while(elem=_854.pop()){
|
||
|
for(var i=0;i<elem.childNodes.length;i++){
|
||
|
var _858=elem.childNodes[i];
|
||
|
if(_858.nodeDocType!=1){
|
||
|
continue;
|
||
|
}
|
||
|
dojo.html.setClass(_858,dojo.html.getClass(_858).replace(reg,"$1"+_851.classPrefix));
|
||
|
_854.push(_858);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
var _859={oldTree:_852,newTree:_851,node:this};
|
||
|
dojo.event.topic.publish(this.tree.eventNames.afterChangeTree,_859);
|
||
|
dojo.event.topic.publish(_851.eventNames.afterChangeTree,_859);
|
||
|
},addedTo:function(_85a,_85b,_85c){
|
||
|
if(this.tree!==_85a.tree){
|
||
|
this.updateTree(_85a.tree);
|
||
|
}
|
||
|
if(_85a.isTreeNode){
|
||
|
if(!_85a.isFolder){
|
||
|
_85a.setFolder();
|
||
|
_85a.state=_85a.loadStates.LOADED;
|
||
|
}
|
||
|
}
|
||
|
var _85d=_85a.children.length;
|
||
|
this.insertNode(_85a,_85b);
|
||
|
this.viewAddLayout();
|
||
|
if(_85d>1){
|
||
|
if(_85b==0&&_85a.children[1] instanceof dojo.widget.Widget){
|
||
|
_85a.children[1].viewUpdateLayout();
|
||
|
}
|
||
|
if(_85b==_85d-1&&_85a.children[_85d-2] instanceof dojo.widget.Widget){
|
||
|
_85a.children[_85d-2].viewUpdateLayout();
|
||
|
}
|
||
|
}else{
|
||
|
if(_85a.isTreeNode){
|
||
|
_85a.viewSetHasChildren();
|
||
|
}
|
||
|
}
|
||
|
if(!_85c){
|
||
|
var _85e={child:this,index:_85b,parent:_85a};
|
||
|
dojo.event.topic.publish(this.tree.eventNames.afterAddChild,_85e);
|
||
|
}
|
||
|
},createSimple:function(args,_860){
|
||
|
if(args.tree){
|
||
|
var tree=args.tree;
|
||
|
}else{
|
||
|
if(_860){
|
||
|
var tree=_860.tree;
|
||
|
}else{
|
||
|
dojo.raise("createSimple: can't evaluate tree");
|
||
|
}
|
||
|
}
|
||
|
tree=dojo.widget.byId(tree);
|
||
|
var _862=new tree.defaultChildWidget();
|
||
|
for(var x in args){
|
||
|
_862[x]=args[x];
|
||
|
}
|
||
|
_862.toggleObj=dojo.lfx.toggle[_862.toggle.toLowerCase()]||dojo.lfx.toggle.plain;
|
||
|
dojo.widget.manager.add(_862);
|
||
|
_862.buildRendering(args,{},_860);
|
||
|
_862.initialize(args,{},_860);
|
||
|
if(_862.parent){
|
||
|
delete dojo.widget.manager.topWidgets[_862.widgetId];
|
||
|
}
|
||
|
return _862;
|
||
|
},viewUpdateLayout:function(){
|
||
|
this.viewRemoveLayout();
|
||
|
this.viewAddLayout();
|
||
|
},viewAddContainer:function(){
|
||
|
this.containerNode=this.tree.containerNodeTemplate.cloneNode(true);
|
||
|
this.domNode.appendChild(this.containerNode);
|
||
|
},viewAddLayout:function(){
|
||
|
if(this.parent["isTree"]){
|
||
|
dojo.html.setClass(this.domNode,dojo.html.getClass(this.domNode)+" "+this.tree.classPrefix+"IsRoot");
|
||
|
}
|
||
|
if(this.isLastChild()){
|
||
|
dojo.html.setClass(this.domNode,dojo.html.getClass(this.domNode)+" "+this.tree.classPrefix+"IsLast");
|
||
|
}
|
||
|
},viewRemoveLayout:function(){
|
||
|
dojo.html.removeClass(this.domNode,this.tree.classPrefix+"IsRoot");
|
||
|
dojo.html.removeClass(this.domNode,this.tree.classPrefix+"IsLast");
|
||
|
},viewGetExpandClass:function(){
|
||
|
if(this.isFolder){
|
||
|
return this.isExpanded?"ExpandOpen":"ExpandClosed";
|
||
|
}else{
|
||
|
return "ExpandLeaf";
|
||
|
}
|
||
|
},viewSetExpand:function(){
|
||
|
var _864=this.tree.classPrefix+this.viewGetExpandClass();
|
||
|
var reg=new RegExp("(^|\\s)"+this.tree.classPrefix+"Expand\\w+","g");
|
||
|
dojo.html.setClass(this.domNode,dojo.html.getClass(this.domNode).replace(reg,"")+" "+_864);
|
||
|
this.viewSetHasChildrenAndExpand();
|
||
|
},viewGetChildrenClass:function(){
|
||
|
return "Children"+(this.children.length?"Yes":"No");
|
||
|
},viewSetHasChildren:function(){
|
||
|
var _866=this.tree.classPrefix+this.viewGetChildrenClass();
|
||
|
var reg=new RegExp("(^|\\s)"+this.tree.classPrefix+"Children\\w+","g");
|
||
|
dojo.html.setClass(this.domNode,dojo.html.getClass(this.domNode).replace(reg,"")+" "+_866);
|
||
|
this.viewSetHasChildrenAndExpand();
|
||
|
},viewSetHasChildrenAndExpand:function(){
|
||
|
var _868=this.tree.classPrefix+"State"+this.viewGetChildrenClass()+"-"+this.viewGetExpandClass();
|
||
|
var reg=new RegExp("(^|\\s)"+this.tree.classPrefix+"State[\\w-]+","g");
|
||
|
dojo.html.setClass(this.domNode,dojo.html.getClass(this.domNode).replace(reg,"")+" "+_868);
|
||
|
},viewUnfocus:function(){
|
||
|
dojo.html.removeClass(this.labelNode,this.tree.classPrefix+"LabelFocused");
|
||
|
},viewFocus:function(){
|
||
|
dojo.html.addClass(this.labelNode,this.tree.classPrefix+"LabelFocused");
|
||
|
},viewEmphasize:function(){
|
||
|
dojo.html.clearSelection(this.labelNode);
|
||
|
dojo.html.addClass(this.labelNode,this.tree.classPrefix+"NodeEmphasized");
|
||
|
},viewUnemphasize:function(){
|
||
|
dojo.html.removeClass(this.labelNode,this.tree.classPrefix+"NodeEmphasized");
|
||
|
},detach:function(){
|
||
|
if(!this.parent){
|
||
|
return;
|
||
|
}
|
||
|
var _86a=this.parent;
|
||
|
var _86b=this.getParentIndex();
|
||
|
this.doDetach.apply(this,arguments);
|
||
|
dojo.event.topic.publish(this.tree.eventNames.afterDetach,{child:this,parent:_86a,index:_86b});
|
||
|
},doDetach:function(){
|
||
|
var _86c=this.parent;
|
||
|
if(!_86c){
|
||
|
return;
|
||
|
}
|
||
|
var _86d=this.getParentIndex();
|
||
|
this.viewRemoveLayout();
|
||
|
dojo.widget.DomWidget.prototype.removeChild.call(_86c,this);
|
||
|
var _86e=_86c.children.length;
|
||
|
if(_86e>0){
|
||
|
if(_86d==0){
|
||
|
_86c.children[0].viewUpdateLayout();
|
||
|
}
|
||
|
if(_86d==_86e){
|
||
|
_86c.children[_86e-1].viewUpdateLayout();
|
||
|
}
|
||
|
}else{
|
||
|
if(_86c.isTreeNode){
|
||
|
_86c.viewSetHasChildren();
|
||
|
}
|
||
|
}
|
||
|
if(this.tree.unsetFolderOnEmpty&&!_86c.children.length&&_86c.isTreeNode){
|
||
|
_86c.unsetFolder();
|
||
|
}
|
||
|
this.parent=null;
|
||
|
},destroy:function(){
|
||
|
dojo.event.topic.publish(this.tree.eventNames.beforeNodeDestroy,{source:this});
|
||
|
this.detach();
|
||
|
return dojo.widget.HtmlWidget.prototype.destroy.apply(this,arguments);
|
||
|
},expand:function(){
|
||
|
if(this.isExpanded){
|
||
|
return;
|
||
|
}
|
||
|
if(this.tryLazyInit){
|
||
|
this.setChildren();
|
||
|
this.tryLazyInit=false;
|
||
|
}
|
||
|
this.isExpanded=true;
|
||
|
this.viewSetExpand();
|
||
|
this.showChildren();
|
||
|
},collapse:function(){
|
||
|
if(!this.isExpanded){
|
||
|
return;
|
||
|
}
|
||
|
this.isExpanded=false;
|
||
|
this.hideChildren();
|
||
|
},hideChildren:function(){
|
||
|
this.tree.toggleObj.hide(this.containerNode,this.tree.toggleDuration,this.explodeSrc,dojo.lang.hitch(this,"onHideChildren"));
|
||
|
},showChildren:function(){
|
||
|
this.tree.toggleObj.show(this.containerNode,this.tree.toggleDuration,this.explodeSrc,dojo.lang.hitch(this,"onShowChildren"));
|
||
|
},onShowChildren:function(){
|
||
|
this.onShow();
|
||
|
dojo.event.topic.publish(this.tree.eventNames.afterExpand,{source:this});
|
||
|
},onHideChildren:function(){
|
||
|
this.viewSetExpand();
|
||
|
this.onHide();
|
||
|
dojo.event.topic.publish(this.tree.eventNames.afterCollapse,{source:this});
|
||
|
},setTitle:function(_86f){
|
||
|
var _870=this.title;
|
||
|
this.labelNode.innerHTML=this.title=_86f;
|
||
|
dojo.event.topic.publish(this.tree.eventNames.afterSetTitle,{source:this,oldTitle:_870});
|
||
|
},toString:function(){
|
||
|
return "["+this.widgetType+", "+this.title+"]";
|
||
|
}});
|
||
|
dojo.provide("dojo.widget.TreeV3");
|
||
|
dojo.widget.defineWidget("dojo.widget.TreeV3",[dojo.widget.HtmlWidget,dojo.widget.TreeWithNode],function(){
|
||
|
this.eventNames={};
|
||
|
this.DndAcceptTypes=[];
|
||
|
this.actionsDisabled=[];
|
||
|
this.listeners=[];
|
||
|
this.tree=this;
|
||
|
},{DndMode:"",defaultChildWidget:null,defaultChildTitle:"New Node",eagerWidgetInstantiation:false,eventNamesDefault:{afterTreeCreate:"afterTreeCreate",beforeTreeDestroy:"beforeTreeDestroy",beforeNodeDestroy:"beforeNodeDestroy",afterChangeTree:"afterChangeTree",afterSetFolder:"afterSetFolder",afterUnsetFolder:"afterUnsetFolder",beforeMoveFrom:"beforeMoveFrom",beforeMoveTo:"beforeMoveTo",afterMoveFrom:"afterMoveFrom",afterMoveTo:"afterMoveTo",afterAddChild:"afterAddChild",afterDetach:"afterDetach",afterExpand:"afterExpand",beforeExpand:"beforeExpand",afterSetTitle:"afterSetTitle",afterCollapse:"afterCollapse",beforeCollapse:"beforeCollapse"},classPrefix:"Tree",style:"",allowAddChildToLeaf:true,unsetFolderOnEmpty:true,DndModes:{BETWEEN:1,ONTO:2},DndAcceptTypes:"",templateCssString:"/* indent for all tree children excepts root */\r\n.TreeNode {\r\n background-image : url('../templates/images/TreeV3/i.gif');\r\n background-position : top left;\r\n background-repeat : repeat-y;\r\n margin-left: 19px;\r\n zoom: 1;\r\n}\r\n.TreeIsRoot {\r\n margin-left: 0;\r\n}\r\n \r\n/* left vertical line (grid) for all nodes */\r\n.TreeIsLast {\r\n background-image: url('../templates/images/TreeV3/i_half.gif');\r\n background-repeat : no-repeat;\r\n}\r\n \r\n.TreeExpandOpen .TreeExpand {\r\n background-image: url('../templates/images/TreeV3/expand_minus.gif');\r\n}\r\n \r\n/* closed is higher priority than open */\r\n.TreeExpandClosed .TreeExpand {\r\n background-image: url('../templates/images/TreeV3/expand_plus.gif');\r\n}\r\n \r\n/* highest priority */\r\n.TreeExpandLeaf .TreeExpand {\r\n background-image: url('../templates/images/TreeV3/expand_leaf.gif');\r\n}\r\n\r\n/* \r\nshould always override any expand setting, but do not touch children.\r\nif I add .TreeExpand .TreeExpandLoading same time and put it to top/bottom, then it will take precedence over +- for all descendants or always fail\r\nso I have to remove TreeExpand and process this one specifically\r\n*/\r\n\r\n.TreeExpandLoading {\r\n width: 18px;\r\n height: 18px;\r\n float: left;\r\n display: inline;\r\n background-repeat : no-repeat;\r\n background-image: url('../templates/images/TreeV3/expand_loading.gif');\r\n}\r\n \r\n.TreeContent {\r\n min-height: 18px;\r\n min-width: 18px;\r\n margin-left:18px;\r\n cursor: default;\r\n /* can't make inline - multiline bugs */\r\n}\r\n\r\n.TreeIEContent {\r\n\theight: 18px;\r\n}\r\n \r\n.TreeExpand {\r\n width: 18px;\r\n height: 18px;\r\n float: left;\r\n display: inline;\r\n background-repeat : no-repeat;\r\n}\r\n \r\n/* same style as IE selection */\r\n.TreeNodeEmphasized {\r\n background-color: Highlight;\r\n color: HighlightText;\r\n}\r\n \r\n.TreeContent .RichTextEditable, .TreeContent .RichTextEditable iframe {\r\n background-color: #ffc;\r\n color: black;\r\n}\r\n\r\n/* don't use :focus due to opera's lack of support on div's */\r\n.TreeLabelFocused {\r\n outline: 1px invert dotted;\r\n}\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/TreeV3.css"),templateString:"<div style=\"${this.style}\">\n</div>",isExpanded:true,isTree:true,createNode:function(data){
|
||
|
data.tree=this.widgetId;
|
||
|
if(data.widgetName){
|
||
|
return dojo.widget.createWidget(data.widgetName,data);
|
||
|
}else{
|
||
|
if(this.defaultChildWidget.prototype.createSimple){
|
||
|
return this.defaultChildWidget.prototype.createSimple(data);
|
||
|
}else{
|
||
|
var ns=this.defaultChildWidget.prototype.ns;
|
||
|
var wt=this.defaultChildWidget.prototype.widgetType;
|
||
|
return dojo.widget.createWidget(ns+":"+wt,data);
|
||
|
}
|
||
|
}
|
||
|
},makeNodeTemplate:function(){
|
||
|
var _874=document.createElement("div");
|
||
|
dojo.html.setClass(_874,this.classPrefix+"Node "+this.classPrefix+"ExpandLeaf "+this.classPrefix+"ChildrenNo");
|
||
|
this.nodeTemplate=_874;
|
||
|
var _875=document.createElement("div");
|
||
|
var _876=this.classPrefix+"Expand";
|
||
|
if(dojo.render.html.ie){
|
||
|
_876=_876+" "+this.classPrefix+"IEExpand";
|
||
|
}
|
||
|
dojo.html.setClass(_875,_876);
|
||
|
this.expandNodeTemplate=_875;
|
||
|
var _877=document.createElement("span");
|
||
|
dojo.html.setClass(_877,this.classPrefix+"Label");
|
||
|
this.labelNodeTemplate=_877;
|
||
|
var _878=document.createElement("div");
|
||
|
var _876=this.classPrefix+"Content";
|
||
|
if(dojo.render.html.ie&&!dojo.render.html.ie70){
|
||
|
_876=_876+" "+this.classPrefix+"IEContent";
|
||
|
}
|
||
|
dojo.html.setClass(_878,_876);
|
||
|
this.contentNodeTemplate=_878;
|
||
|
_874.appendChild(_875);
|
||
|
_874.appendChild(_878);
|
||
|
_878.appendChild(_877);
|
||
|
},makeContainerNodeTemplate:function(){
|
||
|
var div=document.createElement("div");
|
||
|
div.style.display="none";
|
||
|
dojo.html.setClass(div,this.classPrefix+"Container");
|
||
|
this.containerNodeTemplate=div;
|
||
|
},actions:{ADDCHILD:"ADDCHILD"},getInfo:function(){
|
||
|
var info={widgetId:this.widgetId,objectId:this.objectId};
|
||
|
return info;
|
||
|
},adjustEventNames:function(){
|
||
|
for(var name in this.eventNamesDefault){
|
||
|
if(dojo.lang.isUndefined(this.eventNames[name])){
|
||
|
this.eventNames[name]=this.widgetId+"/"+this.eventNamesDefault[name];
|
||
|
}
|
||
|
}
|
||
|
},adjustDndMode:function(){
|
||
|
var _87c=this;
|
||
|
var _87d=0;
|
||
|
dojo.lang.forEach(this.DndMode.split(";"),function(elem){
|
||
|
var mode=_87c.DndModes[dojo.string.trim(elem).toUpperCase()];
|
||
|
if(mode){
|
||
|
_87d=_87d|mode;
|
||
|
}
|
||
|
});
|
||
|
this.DndMode=_87d;
|
||
|
},destroy:function(){
|
||
|
dojo.event.topic.publish(this.tree.eventNames.beforeTreeDestroy,{source:this});
|
||
|
return dojo.widget.HtmlWidget.prototype.destroy.apply(this,arguments);
|
||
|
},initialize:function(args){
|
||
|
this.domNode.widgetId=this.widgetId;
|
||
|
for(var i=0;i<this.actionsDisabled.length;i++){
|
||
|
this.actionsDisabled[i]=this.actionsDisabled[i].toUpperCase();
|
||
|
}
|
||
|
if(!args.defaultChildWidget){
|
||
|
this.defaultChildWidget=dojo.widget.TreeNodeV3;
|
||
|
}else{
|
||
|
this.defaultChildWidget=dojo.lang.getObjPathValue(args.defaultChildWidget);
|
||
|
}
|
||
|
this.adjustEventNames();
|
||
|
this.adjustDndMode();
|
||
|
this.makeNodeTemplate();
|
||
|
this.makeContainerNodeTemplate();
|
||
|
this.containerNode=this.domNode;
|
||
|
dojo.html.setClass(this.domNode,this.classPrefix+"Container");
|
||
|
var _882=this;
|
||
|
dojo.lang.forEach(this.listeners,function(elem){
|
||
|
var t=dojo.lang.isString(elem)?dojo.widget.byId(elem):elem;
|
||
|
t.listenTree(_882);
|
||
|
});
|
||
|
},postCreate:function(){
|
||
|
dojo.event.topic.publish(this.eventNames.afterTreeCreate,{source:this});
|
||
|
},move:function(_885,_886,_887){
|
||
|
if(!_885.parent){
|
||
|
dojo.raise(this.widgetType+": child can be moved only while it's attached");
|
||
|
}
|
||
|
var _888=_885.parent;
|
||
|
var _889=_885.tree;
|
||
|
var _88a=_885.getParentIndex();
|
||
|
var _88b=_886.tree;
|
||
|
var _886=_886;
|
||
|
var _88c=_887;
|
||
|
var _88d={oldParent:_888,oldTree:_889,oldIndex:_88a,newParent:_886,newTree:_88b,newIndex:_88c,child:_885};
|
||
|
dojo.event.topic.publish(_889.eventNames.beforeMoveFrom,_88d);
|
||
|
dojo.event.topic.publish(_88b.eventNames.beforeMoveTo,_88d);
|
||
|
this.doMove.apply(this,arguments);
|
||
|
dojo.event.topic.publish(_889.eventNames.afterMoveFrom,_88d);
|
||
|
dojo.event.topic.publish(_88b.eventNames.afterMoveTo,_88d);
|
||
|
},doMove:function(_88e,_88f,_890){
|
||
|
_88e.doDetach();
|
||
|
_88f.doAddChild(_88e,_890);
|
||
|
},toString:function(){
|
||
|
return "["+this.widgetType+" ID:"+this.widgetId+"]";
|
||
|
}});
|
||
|
dojo.provide("dojo.AdapterRegistry");
|
||
|
dojo.AdapterRegistry=function(_891){
|
||
|
this.pairs=[];
|
||
|
this.returnWrappers=_891||false;
|
||
|
};
|
||
|
dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,_893,wrap,_895,_896){
|
||
|
var type=(_896)?"unshift":"push";
|
||
|
this.pairs[type]([name,_893,wrap,_895]);
|
||
|
},match:function(){
|
||
|
for(var i=0;i<this.pairs.length;i++){
|
||
|
var pair=this.pairs[i];
|
||
|
if(pair[1].apply(this,arguments)){
|
||
|
if((pair[3])||(this.returnWrappers)){
|
||
|
return pair[2];
|
||
|
}else{
|
||
|
return pair[2].apply(this,arguments);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
throw new Error("No match found");
|
||
|
},unregister:function(name){
|
||
|
for(var i=0;i<this.pairs.length;i++){
|
||
|
var pair=this.pairs[i];
|
||
|
if(pair[0]==name){
|
||
|
this.pairs.splice(i,1);
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
}});
|
||
|
dojo.provide("dojo.json");
|
||
|
dojo.json={jsonRegistry:new dojo.AdapterRegistry(),register:function(name,_89e,wrap,_8a0){
|
||
|
dojo.json.jsonRegistry.register(name,_89e,wrap,_8a0);
|
||
|
},evalJson:function(json){
|
||
|
try{
|
||
|
return eval("("+json+")");
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug(e);
|
||
|
return json;
|
||
|
}
|
||
|
},serialize:function(o){
|
||
|
var _8a3=typeof (o);
|
||
|
if(_8a3=="undefined"){
|
||
|
return "undefined";
|
||
|
}else{
|
||
|
if((_8a3=="number")||(_8a3=="boolean")){
|
||
|
return o+"";
|
||
|
}else{
|
||
|
if(o===null){
|
||
|
return "null";
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(_8a3=="string"){
|
||
|
return dojo.string.escapeString(o);
|
||
|
}
|
||
|
var me=arguments.callee;
|
||
|
var _8a5;
|
||
|
if(typeof (o.__json__)=="function"){
|
||
|
_8a5=o.__json__();
|
||
|
if(o!==_8a5){
|
||
|
return me(_8a5);
|
||
|
}
|
||
|
}
|
||
|
if(typeof (o.json)=="function"){
|
||
|
_8a5=o.json();
|
||
|
if(o!==_8a5){
|
||
|
return me(_8a5);
|
||
|
}
|
||
|
}
|
||
|
if(_8a3!="function"&&typeof (o.length)=="number"){
|
||
|
var res=[];
|
||
|
for(var i=0;i<o.length;i++){
|
||
|
var val=me(o[i]);
|
||
|
if(typeof (val)!="string"){
|
||
|
val="undefined";
|
||
|
}
|
||
|
res.push(val);
|
||
|
}
|
||
|
return "["+res.join(",")+"]";
|
||
|
}
|
||
|
try{
|
||
|
window.o=o;
|
||
|
_8a5=dojo.json.jsonRegistry.match(o);
|
||
|
return me(_8a5);
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
if(_8a3=="function"){
|
||
|
return null;
|
||
|
}
|
||
|
res=[];
|
||
|
for(var k in o){
|
||
|
var _8aa;
|
||
|
if(typeof (k)=="number"){
|
||
|
_8aa="\""+k+"\"";
|
||
|
}else{
|
||
|
if(typeof (k)=="string"){
|
||
|
_8aa=dojo.string.escapeString(k);
|
||
|
}else{
|
||
|
continue;
|
||
|
}
|
||
|
}
|
||
|
val=me(o[k]);
|
||
|
if(typeof (val)!="string"){
|
||
|
continue;
|
||
|
}
|
||
|
res.push(_8aa+":"+val);
|
||
|
}
|
||
|
return "{"+res.join(",")+"}";
|
||
|
}};
|
||
|
dojo.provide("dojo.dnd.DragAndDrop");
|
||
|
dojo.declare("dojo.dnd.DragSource",null,{type:"",onDragEnd:function(evt){
|
||
|
},onDragStart:function(evt){
|
||
|
},onSelected:function(evt){
|
||
|
},unregister:function(){
|
||
|
dojo.dnd.dragManager.unregisterDragSource(this);
|
||
|
},reregister:function(){
|
||
|
dojo.dnd.dragManager.registerDragSource(this);
|
||
|
}});
|
||
|
dojo.declare("dojo.dnd.DragObject",null,{type:"",register:function(){
|
||
|
var dm=dojo.dnd.dragManager;
|
||
|
if(dm["registerDragObject"]){
|
||
|
dm.registerDragObject(this);
|
||
|
}
|
||
|
},onDragStart:function(evt){
|
||
|
},onDragMove:function(evt){
|
||
|
},onDragOver:function(evt){
|
||
|
},onDragOut:function(evt){
|
||
|
},onDragEnd:function(evt){
|
||
|
},onDragLeave:dojo.lang.forward("onDragOut"),onDragEnter:dojo.lang.forward("onDragOver"),ondragout:dojo.lang.forward("onDragOut"),ondragover:dojo.lang.forward("onDragOver")});
|
||
|
dojo.declare("dojo.dnd.DropTarget",null,{acceptsType:function(type){
|
||
|
if(!dojo.lang.inArray(this.acceptedTypes,"*")){
|
||
|
if(!dojo.lang.inArray(this.acceptedTypes,type)){
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
return true;
|
||
|
},accepts:function(_8b5){
|
||
|
if(!dojo.lang.inArray(this.acceptedTypes,"*")){
|
||
|
for(var i=0;i<_8b5.length;i++){
|
||
|
if(!dojo.lang.inArray(this.acceptedTypes,_8b5[i].type)){
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return true;
|
||
|
},unregister:function(){
|
||
|
dojo.dnd.dragManager.unregisterDropTarget(this);
|
||
|
},onDragOver:function(evt){
|
||
|
},onDragOut:function(evt){
|
||
|
},onDragMove:function(evt){
|
||
|
},onDropStart:function(evt){
|
||
|
},onDrop:function(evt){
|
||
|
},onDropEnd:function(){
|
||
|
}},function(){
|
||
|
this.acceptedTypes=[];
|
||
|
});
|
||
|
dojo.dnd.DragEvent=function(){
|
||
|
this.dragSource=null;
|
||
|
this.dragObject=null;
|
||
|
this.target=null;
|
||
|
this.eventStatus="success";
|
||
|
};
|
||
|
dojo.declare("dojo.dnd.DragManager",null,{selectedSources:[],dragObjects:[],dragSources:[],registerDragSource:function(_8bc){
|
||
|
},dropTargets:[],registerDropTarget:function(_8bd){
|
||
|
},lastDragTarget:null,currentDragTarget:null,onKeyDown:function(){
|
||
|
},onMouseOut:function(){
|
||
|
},onMouseMove:function(){
|
||
|
},onMouseUp:function(){
|
||
|
}});
|
||
|
dojo.provide("dojo.dnd.HtmlDragManager");
|
||
|
dojo.declare("dojo.dnd.HtmlDragManager",dojo.dnd.DragManager,{disabled:false,nestedTargets:false,mouseDownTimer:null,dsCounter:0,dsPrefix:"dojoDragSource",dropTargetDimensions:[],currentDropTarget:null,previousDropTarget:null,_dragTriggered:false,selectedSources:[],dragObjects:[],dragSources:[],dropTargets:[],currentX:null,currentY:null,lastX:null,lastY:null,mouseDownX:null,mouseDownY:null,threshold:7,dropAcceptable:false,cancelEvent:function(e){
|
||
|
e.stopPropagation();
|
||
|
e.preventDefault();
|
||
|
},registerDragSource:function(ds){
|
||
|
if(ds["domNode"]){
|
||
|
var dp=this.dsPrefix;
|
||
|
var _8c1=dp+"Idx_"+(this.dsCounter++);
|
||
|
ds.dragSourceId=_8c1;
|
||
|
this.dragSources[_8c1]=ds;
|
||
|
ds.domNode.setAttribute(dp,_8c1);
|
||
|
if(dojo.render.html.ie){
|
||
|
dojo.event.browser.addListener(ds.domNode,"ondragstart",this.cancelEvent);
|
||
|
}
|
||
|
}
|
||
|
},unregisterDragSource:function(ds){
|
||
|
if(ds["domNode"]){
|
||
|
var dp=this.dsPrefix;
|
||
|
var _8c4=ds.dragSourceId;
|
||
|
delete ds.dragSourceId;
|
||
|
delete this.dragSources[_8c4];
|
||
|
ds.domNode.setAttribute(dp,null);
|
||
|
if(dojo.render.html.ie){
|
||
|
dojo.event.browser.removeListener(ds.domNode,"ondragstart",this.cancelEvent);
|
||
|
}
|
||
|
}
|
||
|
},registerDropTarget:function(dt){
|
||
|
this.dropTargets.push(dt);
|
||
|
},unregisterDropTarget:function(dt){
|
||
|
var _8c7=dojo.lang.find(this.dropTargets,dt,true);
|
||
|
if(_8c7>=0){
|
||
|
this.dropTargets.splice(_8c7,1);
|
||
|
}
|
||
|
},getDragSource:function(e){
|
||
|
var tn=e.target;
|
||
|
if(tn===dojo.body()){
|
||
|
return;
|
||
|
}
|
||
|
var ta=dojo.html.getAttribute(tn,this.dsPrefix);
|
||
|
while((!ta)&&(tn)){
|
||
|
tn=tn.parentNode;
|
||
|
if((!tn)||(tn===dojo.body())){
|
||
|
return;
|
||
|
}
|
||
|
ta=dojo.html.getAttribute(tn,this.dsPrefix);
|
||
|
}
|
||
|
return this.dragSources[ta];
|
||
|
},onKeyDown:function(e){
|
||
|
},onMouseDown:function(e){
|
||
|
if(this.disabled){
|
||
|
return;
|
||
|
}
|
||
|
if(dojo.render.html.ie){
|
||
|
if(e.button!=1){
|
||
|
return;
|
||
|
}
|
||
|
}else{
|
||
|
if(e.which!=1){
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
var _8cd=e.target.nodeType==dojo.html.TEXT_NODE?e.target.parentNode:e.target;
|
||
|
if(dojo.html.isTag(_8cd,"button","textarea","input","select","option")){
|
||
|
return;
|
||
|
}
|
||
|
var ds=this.getDragSource(e);
|
||
|
if(!ds){
|
||
|
return;
|
||
|
}
|
||
|
if(!dojo.lang.inArray(this.selectedSources,ds)){
|
||
|
this.selectedSources.push(ds);
|
||
|
ds.onSelected();
|
||
|
}
|
||
|
this.mouseDownX=e.pageX;
|
||
|
this.mouseDownY=e.pageY;
|
||
|
e.preventDefault();
|
||
|
dojo.event.connect(document,"onmousemove",this,"onMouseMove");
|
||
|
},onMouseUp:function(e,_8d0){
|
||
|
if(this.selectedSources.length==0){
|
||
|
return;
|
||
|
}
|
||
|
this.mouseDownX=null;
|
||
|
this.mouseDownY=null;
|
||
|
this._dragTriggered=false;
|
||
|
e.dragSource=this.dragSource;
|
||
|
if((!e.shiftKey)&&(!e.ctrlKey)){
|
||
|
if(this.currentDropTarget){
|
||
|
this.currentDropTarget.onDropStart();
|
||
|
}
|
||
|
dojo.lang.forEach(this.dragObjects,function(_8d1){
|
||
|
var ret=null;
|
||
|
if(!_8d1){
|
||
|
return;
|
||
|
}
|
||
|
if(this.currentDropTarget){
|
||
|
e.dragObject=_8d1;
|
||
|
var ce=this.currentDropTarget.domNode.childNodes;
|
||
|
if(ce.length>0){
|
||
|
e.dropTarget=ce[0];
|
||
|
while(e.dropTarget==_8d1.domNode){
|
||
|
e.dropTarget=e.dropTarget.nextSibling;
|
||
|
}
|
||
|
}else{
|
||
|
e.dropTarget=this.currentDropTarget.domNode;
|
||
|
}
|
||
|
if(this.dropAcceptable){
|
||
|
ret=this.currentDropTarget.onDrop(e);
|
||
|
}else{
|
||
|
this.currentDropTarget.onDragOut(e);
|
||
|
}
|
||
|
}
|
||
|
e.dragStatus=this.dropAcceptable&&ret?"dropSuccess":"dropFailure";
|
||
|
dojo.lang.delayThese([function(){
|
||
|
try{
|
||
|
_8d1.dragSource.onDragEnd(e);
|
||
|
}
|
||
|
catch(err){
|
||
|
var _8d4={};
|
||
|
for(var i in e){
|
||
|
if(i=="type"){
|
||
|
_8d4.type="mouseup";
|
||
|
continue;
|
||
|
}
|
||
|
_8d4[i]=e[i];
|
||
|
}
|
||
|
_8d1.dragSource.onDragEnd(_8d4);
|
||
|
}
|
||
|
},function(){
|
||
|
_8d1.onDragEnd(e);
|
||
|
}]);
|
||
|
},this);
|
||
|
this.selectedSources=[];
|
||
|
this.dragObjects=[];
|
||
|
this.dragSource=null;
|
||
|
if(this.currentDropTarget){
|
||
|
this.currentDropTarget.onDropEnd();
|
||
|
}
|
||
|
}else{
|
||
|
}
|
||
|
dojo.event.disconnect(document,"onmousemove",this,"onMouseMove");
|
||
|
this.currentDropTarget=null;
|
||
|
},onScroll:function(){
|
||
|
for(var i=0;i<this.dragObjects.length;i++){
|
||
|
if(this.dragObjects[i].updateDragOffset){
|
||
|
this.dragObjects[i].updateDragOffset();
|
||
|
}
|
||
|
}
|
||
|
if(this.dragObjects.length){
|
||
|
this.cacheTargetLocations();
|
||
|
}
|
||
|
},_dragStartDistance:function(x,y){
|
||
|
if((!this.mouseDownX)||(!this.mouseDownX)){
|
||
|
return;
|
||
|
}
|
||
|
var dx=Math.abs(x-this.mouseDownX);
|
||
|
var dx2=dx*dx;
|
||
|
var dy=Math.abs(y-this.mouseDownY);
|
||
|
var dy2=dy*dy;
|
||
|
return parseInt(Math.sqrt(dx2+dy2),10);
|
||
|
},cacheTargetLocations:function(){
|
||
|
dojo.profile.start("cacheTargetLocations");
|
||
|
this.dropTargetDimensions=[];
|
||
|
dojo.lang.forEach(this.dropTargets,function(_8dd){
|
||
|
var tn=_8dd.domNode;
|
||
|
if(!tn||!_8dd.accepts([this.dragSource])){
|
||
|
return;
|
||
|
}
|
||
|
var abs=dojo.html.getAbsolutePosition(tn,true);
|
||
|
var bb=dojo.html.getBorderBox(tn);
|
||
|
this.dropTargetDimensions.push([[abs.x,abs.y],[abs.x+bb.width,abs.y+bb.height],_8dd]);
|
||
|
},this);
|
||
|
dojo.profile.end("cacheTargetLocations");
|
||
|
},onMouseMove:function(e){
|
||
|
if((dojo.render.html.ie)&&(e.button!=1)){
|
||
|
this.currentDropTarget=null;
|
||
|
this.onMouseUp(e,true);
|
||
|
return;
|
||
|
}
|
||
|
if((this.selectedSources.length)&&(!this.dragObjects.length)){
|
||
|
var dx;
|
||
|
var dy;
|
||
|
if(!this._dragTriggered){
|
||
|
this._dragTriggered=(this._dragStartDistance(e.pageX,e.pageY)>this.threshold);
|
||
|
if(!this._dragTriggered){
|
||
|
return;
|
||
|
}
|
||
|
dx=e.pageX-this.mouseDownX;
|
||
|
dy=e.pageY-this.mouseDownY;
|
||
|
}
|
||
|
this.dragSource=this.selectedSources[0];
|
||
|
dojo.lang.forEach(this.selectedSources,function(_8e4){
|
||
|
if(!_8e4){
|
||
|
return;
|
||
|
}
|
||
|
var tdo=_8e4.onDragStart(e);
|
||
|
if(tdo){
|
||
|
tdo.onDragStart(e);
|
||
|
tdo.dragOffset.y+=dy;
|
||
|
tdo.dragOffset.x+=dx;
|
||
|
tdo.dragSource=_8e4;
|
||
|
this.dragObjects.push(tdo);
|
||
|
}
|
||
|
},this);
|
||
|
this.previousDropTarget=null;
|
||
|
this.cacheTargetLocations();
|
||
|
}
|
||
|
dojo.lang.forEach(this.dragObjects,function(_8e6){
|
||
|
if(_8e6){
|
||
|
_8e6.onDragMove(e);
|
||
|
}
|
||
|
});
|
||
|
if(this.currentDropTarget){
|
||
|
var c=dojo.html.toCoordinateObject(this.currentDropTarget.domNode,true);
|
||
|
var dtp=[[c.x,c.y],[c.x+c.width,c.y+c.height]];
|
||
|
}
|
||
|
if((!this.nestedTargets)&&(dtp)&&(this.isInsideBox(e,dtp))){
|
||
|
if(this.dropAcceptable){
|
||
|
this.currentDropTarget.onDragMove(e,this.dragObjects);
|
||
|
}
|
||
|
}else{
|
||
|
var _8e9=this.findBestTarget(e);
|
||
|
if(_8e9.target===null){
|
||
|
if(this.currentDropTarget){
|
||
|
this.currentDropTarget.onDragOut(e);
|
||
|
this.previousDropTarget=this.currentDropTarget;
|
||
|
this.currentDropTarget=null;
|
||
|
}
|
||
|
this.dropAcceptable=false;
|
||
|
return;
|
||
|
}
|
||
|
if(this.currentDropTarget!==_8e9.target){
|
||
|
if(this.currentDropTarget){
|
||
|
this.previousDropTarget=this.currentDropTarget;
|
||
|
this.currentDropTarget.onDragOut(e);
|
||
|
}
|
||
|
this.currentDropTarget=_8e9.target;
|
||
|
e.dragObjects=this.dragObjects;
|
||
|
this.dropAcceptable=this.currentDropTarget.onDragOver(e);
|
||
|
}else{
|
||
|
if(this.dropAcceptable){
|
||
|
this.currentDropTarget.onDragMove(e,this.dragObjects);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},findBestTarget:function(e){
|
||
|
var _8eb=this;
|
||
|
var _8ec=new Object();
|
||
|
_8ec.target=null;
|
||
|
_8ec.points=null;
|
||
|
dojo.lang.every(this.dropTargetDimensions,function(_8ed){
|
||
|
if(!_8eb.isInsideBox(e,_8ed)){
|
||
|
return true;
|
||
|
}
|
||
|
_8ec.target=_8ed[2];
|
||
|
_8ec.points=_8ed;
|
||
|
return Boolean(_8eb.nestedTargets);
|
||
|
});
|
||
|
return _8ec;
|
||
|
},isInsideBox:function(e,_8ef){
|
||
|
if((e.pageX>_8ef[0][0])&&(e.pageX<_8ef[1][0])&&(e.pageY>_8ef[0][1])&&(e.pageY<_8ef[1][1])){
|
||
|
return true;
|
||
|
}
|
||
|
return false;
|
||
|
},onMouseOver:function(e){
|
||
|
},onMouseOut:function(e){
|
||
|
}});
|
||
|
dojo.dnd.dragManager=new dojo.dnd.HtmlDragManager();
|
||
|
(function(){
|
||
|
var d=document;
|
||
|
var dm=dojo.dnd.dragManager;
|
||
|
dojo.event.connect(d,"onkeydown",dm,"onKeyDown");
|
||
|
dojo.event.connect(d,"onmouseover",dm,"onMouseOver");
|
||
|
dojo.event.connect(d,"onmouseout",dm,"onMouseOut");
|
||
|
dojo.event.connect(d,"onmousedown",dm,"onMouseDown");
|
||
|
dojo.event.connect(d,"onmouseup",dm,"onMouseUp");
|
||
|
dojo.event.connect(window,"onscroll",dm,"onScroll");
|
||
|
})();
|
||
|
dojo.provide("dojo.html.selection");
|
||
|
dojo.html.selectionType={NONE:0,TEXT:1,CONTROL:2};
|
||
|
dojo.html.clearSelection=function(){
|
||
|
var _8f4=dojo.global();
|
||
|
var _8f5=dojo.doc();
|
||
|
try{
|
||
|
if(_8f4["getSelection"]){
|
||
|
if(dojo.render.html.safari){
|
||
|
_8f4.getSelection().collapse();
|
||
|
}else{
|
||
|
_8f4.getSelection().removeAllRanges();
|
||
|
}
|
||
|
}else{
|
||
|
if(_8f5.selection){
|
||
|
if(_8f5.selection.empty){
|
||
|
_8f5.selection.empty();
|
||
|
}else{
|
||
|
if(_8f5.selection.clear){
|
||
|
_8f5.selection.clear();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug(e);
|
||
|
return false;
|
||
|
}
|
||
|
};
|
||
|
dojo.html.disableSelection=function(_8f6){
|
||
|
_8f6=dojo.byId(_8f6)||dojo.body();
|
||
|
var h=dojo.render.html;
|
||
|
if(h.mozilla){
|
||
|
_8f6.style.MozUserSelect="none";
|
||
|
}else{
|
||
|
if(h.safari){
|
||
|
_8f6.style.KhtmlUserSelect="none";
|
||
|
}else{
|
||
|
if(h.ie){
|
||
|
_8f6.unselectable="on";
|
||
|
}else{
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return true;
|
||
|
};
|
||
|
dojo.html.enableSelection=function(_8f8){
|
||
|
_8f8=dojo.byId(_8f8)||dojo.body();
|
||
|
var h=dojo.render.html;
|
||
|
if(h.mozilla){
|
||
|
_8f8.style.MozUserSelect="";
|
||
|
}else{
|
||
|
if(h.safari){
|
||
|
_8f8.style.KhtmlUserSelect="";
|
||
|
}else{
|
||
|
if(h.ie){
|
||
|
_8f8.unselectable="off";
|
||
|
}else{
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return true;
|
||
|
};
|
||
|
dojo.html.selectElement=function(_8fa){
|
||
|
dojo.deprecated("dojo.html.selectElement","replaced by dojo.html.selection.selectElementChildren",0.5);
|
||
|
};
|
||
|
dojo.html.selectInputText=function(_8fb){
|
||
|
var _8fc=dojo.global();
|
||
|
var _8fd=dojo.doc();
|
||
|
_8fb=dojo.byId(_8fb);
|
||
|
if(_8fd["selection"]&&dojo.body()["createTextRange"]){
|
||
|
var _8fe=_8fb.createTextRange();
|
||
|
_8fe.moveStart("character",0);
|
||
|
_8fe.moveEnd("character",_8fb.value.length);
|
||
|
_8fe.select();
|
||
|
}else{
|
||
|
if(_8fc["getSelection"]){
|
||
|
var _8ff=_8fc.getSelection();
|
||
|
_8fb.setSelectionRange(0,_8fb.value.length);
|
||
|
}
|
||
|
}
|
||
|
_8fb.focus();
|
||
|
};
|
||
|
dojo.html.isSelectionCollapsed=function(){
|
||
|
dojo.deprecated("dojo.html.isSelectionCollapsed","replaced by dojo.html.selection.isCollapsed",0.5);
|
||
|
return dojo.html.selection.isCollapsed();
|
||
|
};
|
||
|
dojo.lang.mixin(dojo.html.selection,{getType:function(){
|
||
|
if(dojo.doc()["selection"]){
|
||
|
return dojo.html.selectionType[dojo.doc().selection.type.toUpperCase()];
|
||
|
}else{
|
||
|
var _900=dojo.html.selectionType.TEXT;
|
||
|
var oSel;
|
||
|
try{
|
||
|
oSel=dojo.global().getSelection();
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
if(oSel&&oSel.rangeCount==1){
|
||
|
var _902=oSel.getRangeAt(0);
|
||
|
if(_902.startContainer==_902.endContainer&&(_902.endOffset-_902.startOffset)==1&&_902.startContainer.nodeType!=dojo.dom.TEXT_NODE){
|
||
|
_900=dojo.html.selectionType.CONTROL;
|
||
|
}
|
||
|
}
|
||
|
return _900;
|
||
|
}
|
||
|
},isCollapsed:function(){
|
||
|
var _903=dojo.global();
|
||
|
var _904=dojo.doc();
|
||
|
if(_904["selection"]){
|
||
|
return _904.selection.createRange().text=="";
|
||
|
}else{
|
||
|
if(_903["getSelection"]){
|
||
|
var _905=_903.getSelection();
|
||
|
if(dojo.lang.isString(_905)){
|
||
|
return _905=="";
|
||
|
}else{
|
||
|
return _905.isCollapsed||_905.toString()=="";
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},getSelectedElement:function(){
|
||
|
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
|
||
|
if(dojo.doc()["selection"]){
|
||
|
var _906=dojo.doc().selection.createRange();
|
||
|
if(_906&&_906.item){
|
||
|
return dojo.doc().selection.createRange().item(0);
|
||
|
}
|
||
|
}else{
|
||
|
var _907=dojo.global().getSelection();
|
||
|
return _907.anchorNode.childNodes[_907.anchorOffset];
|
||
|
}
|
||
|
}
|
||
|
},getParentElement:function(){
|
||
|
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
|
||
|
var p=dojo.html.selection.getSelectedElement();
|
||
|
if(p){
|
||
|
return p.parentNode;
|
||
|
}
|
||
|
}else{
|
||
|
if(dojo.doc()["selection"]){
|
||
|
return dojo.doc().selection.createRange().parentElement();
|
||
|
}else{
|
||
|
var _909=dojo.global().getSelection();
|
||
|
if(_909){
|
||
|
var node=_909.anchorNode;
|
||
|
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
|
||
|
node=node.parentNode;
|
||
|
}
|
||
|
return node;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},getSelectedText:function(){
|
||
|
if(dojo.doc()["selection"]){
|
||
|
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
|
||
|
return null;
|
||
|
}
|
||
|
return dojo.doc().selection.createRange().text;
|
||
|
}else{
|
||
|
var _90b=dojo.global().getSelection();
|
||
|
if(_90b){
|
||
|
return _90b.toString();
|
||
|
}
|
||
|
}
|
||
|
},getSelectedHtml:function(){
|
||
|
if(dojo.doc()["selection"]){
|
||
|
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
|
||
|
return null;
|
||
|
}
|
||
|
return dojo.doc().selection.createRange().htmlText;
|
||
|
}else{
|
||
|
var _90c=dojo.global().getSelection();
|
||
|
if(_90c&&_90c.rangeCount){
|
||
|
var frag=_90c.getRangeAt(0).cloneContents();
|
||
|
var div=document.createElement("div");
|
||
|
div.appendChild(frag);
|
||
|
return div.innerHTML;
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
},hasAncestorElement:function(_90f){
|
||
|
return (dojo.html.selection.getAncestorElement.apply(this,arguments)!=null);
|
||
|
},getAncestorElement:function(_910){
|
||
|
var node=dojo.html.selection.getSelectedElement()||dojo.html.selection.getParentElement();
|
||
|
while(node){
|
||
|
if(dojo.html.selection.isTag(node,arguments).length>0){
|
||
|
return node;
|
||
|
}
|
||
|
node=node.parentNode;
|
||
|
}
|
||
|
return null;
|
||
|
},isTag:function(node,tags){
|
||
|
if(node&&node.tagName){
|
||
|
for(var i=0;i<tags.length;i++){
|
||
|
if(node.tagName.toLowerCase()==String(tags[i]).toLowerCase()){
|
||
|
return String(tags[i]).toLowerCase();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return "";
|
||
|
},selectElement:function(_915){
|
||
|
var _916=dojo.global();
|
||
|
var _917=dojo.doc();
|
||
|
_915=dojo.byId(_915);
|
||
|
if(_917.selection&&dojo.body().createTextRange){
|
||
|
try{
|
||
|
var _918=dojo.body().createControlRange();
|
||
|
_918.addElement(_915);
|
||
|
_918.select();
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.html.selection.selectElementChildren(_915);
|
||
|
}
|
||
|
}else{
|
||
|
if(_916["getSelection"]){
|
||
|
var _919=_916.getSelection();
|
||
|
if(_919["removeAllRanges"]){
|
||
|
var _918=_917.createRange();
|
||
|
_918.selectNode(_915);
|
||
|
_919.removeAllRanges();
|
||
|
_919.addRange(_918);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},selectElementChildren:function(_91a){
|
||
|
var _91b=dojo.global();
|
||
|
var _91c=dojo.doc();
|
||
|
_91a=dojo.byId(_91a);
|
||
|
if(_91c.selection&&dojo.body().createTextRange){
|
||
|
var _91d=dojo.body().createTextRange();
|
||
|
_91d.moveToElementText(_91a);
|
||
|
_91d.select();
|
||
|
}else{
|
||
|
if(_91b["getSelection"]){
|
||
|
var _91e=_91b.getSelection();
|
||
|
if(_91e["setBaseAndExtent"]){
|
||
|
_91e.setBaseAndExtent(_91a,0,_91a,_91a.innerText.length-1);
|
||
|
}else{
|
||
|
if(_91e["selectAllChildren"]){
|
||
|
_91e.selectAllChildren(_91a);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},getBookmark:function(){
|
||
|
var _91f;
|
||
|
var _920=dojo.doc();
|
||
|
if(_920["selection"]){
|
||
|
var _921=_920.selection.createRange();
|
||
|
_91f=_921.getBookmark();
|
||
|
}else{
|
||
|
var _922;
|
||
|
try{
|
||
|
_922=dojo.global().getSelection();
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
if(_922){
|
||
|
var _921=_922.getRangeAt(0);
|
||
|
_91f=_921.cloneRange();
|
||
|
}else{
|
||
|
dojo.debug("No idea how to store the current selection for this browser!");
|
||
|
}
|
||
|
}
|
||
|
return _91f;
|
||
|
},moveToBookmark:function(_923){
|
||
|
var _924=dojo.doc();
|
||
|
if(_924["selection"]){
|
||
|
var _925=_924.selection.createRange();
|
||
|
_925.moveToBookmark(_923);
|
||
|
_925.select();
|
||
|
}else{
|
||
|
var _926;
|
||
|
try{
|
||
|
_926=dojo.global().getSelection();
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
if(_926&&_926["removeAllRanges"]){
|
||
|
_926.removeAllRanges();
|
||
|
_926.addRange(_923);
|
||
|
}else{
|
||
|
dojo.debug("No idea how to restore selection for this browser!");
|
||
|
}
|
||
|
}
|
||
|
},collapse:function(_927){
|
||
|
if(dojo.global()["getSelection"]){
|
||
|
var _928=dojo.global().getSelection();
|
||
|
if(_928.removeAllRanges){
|
||
|
if(_927){
|
||
|
_928.collapseToStart();
|
||
|
}else{
|
||
|
_928.collapseToEnd();
|
||
|
}
|
||
|
}else{
|
||
|
dojo.global().getSelection().collapse(_927);
|
||
|
}
|
||
|
}else{
|
||
|
if(dojo.doc().selection){
|
||
|
var _929=dojo.doc().selection.createRange();
|
||
|
_929.collapse(_927);
|
||
|
_929.select();
|
||
|
}
|
||
|
}
|
||
|
},remove:function(){
|
||
|
if(dojo.doc().selection){
|
||
|
var _92a=dojo.doc().selection;
|
||
|
if(_92a.type.toUpperCase()!="NONE"){
|
||
|
_92a.clear();
|
||
|
}
|
||
|
return _92a;
|
||
|
}else{
|
||
|
var _92a=dojo.global().getSelection();
|
||
|
for(var i=0;i<_92a.rangeCount;i++){
|
||
|
_92a.getRangeAt(i).deleteContents();
|
||
|
}
|
||
|
return _92a;
|
||
|
}
|
||
|
}});
|
||
|
dojo.provide("dojo.html.iframe");
|
||
|
dojo.html.iframeContentWindow=function(_92c){
|
||
|
var win=dojo.html.getDocumentWindow(dojo.html.iframeContentDocument(_92c))||dojo.html.iframeContentDocument(_92c).__parent__||(_92c.name&&document.frames[_92c.name])||null;
|
||
|
return win;
|
||
|
};
|
||
|
dojo.html.iframeContentDocument=function(_92e){
|
||
|
var doc=_92e.contentDocument||((_92e.contentWindow)&&(_92e.contentWindow.document))||((_92e.name)&&(document.frames[_92e.name])&&(document.frames[_92e.name].document))||null;
|
||
|
return doc;
|
||
|
};
|
||
|
dojo.html.BackgroundIframe=function(node){
|
||
|
if(dojo.render.html.ie55||dojo.render.html.ie60){
|
||
|
var html="<iframe src='javascript:false'"+" style='position: absolute; left: 0px; top: 0px; width: 100%; height: 100%;"+"z-index: -1; filter:Alpha(Opacity=\"0\");' "+">";
|
||
|
this.iframe=dojo.doc().createElement(html);
|
||
|
this.iframe.tabIndex=-1;
|
||
|
if(node){
|
||
|
node.appendChild(this.iframe);
|
||
|
this.domNode=node;
|
||
|
}else{
|
||
|
dojo.body().appendChild(this.iframe);
|
||
|
this.iframe.style.display="none";
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.lang.extend(dojo.html.BackgroundIframe,{iframe:null,onResized:function(){
|
||
|
if(this.iframe&&this.domNode&&this.domNode.parentNode){
|
||
|
var _932=dojo.html.getMarginBox(this.domNode);
|
||
|
if(_932.width==0||_932.height==0){
|
||
|
dojo.lang.setTimeout(this,this.onResized,100);
|
||
|
return;
|
||
|
}
|
||
|
this.iframe.style.width=_932.width+"px";
|
||
|
this.iframe.style.height=_932.height+"px";
|
||
|
}
|
||
|
},size:function(node){
|
||
|
if(!this.iframe){
|
||
|
return;
|
||
|
}
|
||
|
var _934=dojo.html.toCoordinateObject(node,true,dojo.html.boxSizing.BORDER_BOX);
|
||
|
with(this.iframe.style){
|
||
|
width=_934.width+"px";
|
||
|
height=_934.height+"px";
|
||
|
left=_934.left+"px";
|
||
|
top=_934.top+"px";
|
||
|
}
|
||
|
},setZIndex:function(node){
|
||
|
if(!this.iframe){
|
||
|
return;
|
||
|
}
|
||
|
if(dojo.dom.isNode(node)){
|
||
|
this.iframe.style.zIndex=dojo.html.getStyle(node,"z-index")-1;
|
||
|
}else{
|
||
|
if(!isNaN(node)){
|
||
|
this.iframe.style.zIndex=node;
|
||
|
}
|
||
|
}
|
||
|
},show:function(){
|
||
|
if(this.iframe){
|
||
|
this.iframe.style.display="block";
|
||
|
}
|
||
|
},hide:function(){
|
||
|
if(this.iframe){
|
||
|
this.iframe.style.display="none";
|
||
|
}
|
||
|
},remove:function(){
|
||
|
if(this.iframe){
|
||
|
dojo.html.removeNode(this.iframe,true);
|
||
|
delete this.iframe;
|
||
|
this.iframe=null;
|
||
|
}
|
||
|
}});
|
||
|
dojo.provide("dojo.dnd.HtmlDragAndDrop");
|
||
|
dojo.declare("dojo.dnd.HtmlDragSource",dojo.dnd.DragSource,{dragClass:"",onDragStart:function(){
|
||
|
var _936=new dojo.dnd.HtmlDragObject(this.dragObject,this.type);
|
||
|
if(this.dragClass){
|
||
|
_936.dragClass=this.dragClass;
|
||
|
}
|
||
|
if(this.constrainToContainer){
|
||
|
_936.constrainTo(this.constrainingContainer||this.domNode.parentNode);
|
||
|
}
|
||
|
return _936;
|
||
|
},setDragHandle:function(node){
|
||
|
node=dojo.byId(node);
|
||
|
dojo.dnd.dragManager.unregisterDragSource(this);
|
||
|
this.domNode=node;
|
||
|
dojo.dnd.dragManager.registerDragSource(this);
|
||
|
},setDragTarget:function(node){
|
||
|
this.dragObject=node;
|
||
|
},constrainTo:function(_939){
|
||
|
this.constrainToContainer=true;
|
||
|
if(_939){
|
||
|
this.constrainingContainer=_939;
|
||
|
}
|
||
|
},onSelected:function(){
|
||
|
for(var i=0;i<this.dragObjects.length;i++){
|
||
|
dojo.dnd.dragManager.selectedSources.push(new dojo.dnd.HtmlDragSource(this.dragObjects[i]));
|
||
|
}
|
||
|
},addDragObjects:function(el){
|
||
|
for(var i=0;i<arguments.length;i++){
|
||
|
this.dragObjects.push(dojo.byId(arguments[i]));
|
||
|
}
|
||
|
}},function(node,type){
|
||
|
node=dojo.byId(node);
|
||
|
this.dragObjects=[];
|
||
|
this.constrainToContainer=false;
|
||
|
if(node){
|
||
|
this.domNode=node;
|
||
|
this.dragObject=node;
|
||
|
this.type=(type)||(this.domNode.nodeName.toLowerCase());
|
||
|
dojo.dnd.DragSource.prototype.reregister.call(this);
|
||
|
}
|
||
|
});
|
||
|
dojo.declare("dojo.dnd.HtmlDragObject",dojo.dnd.DragObject,{dragClass:"",opacity:0.5,createIframe:true,disableX:false,disableY:false,createDragNode:function(){
|
||
|
var node=this.domNode.cloneNode(true);
|
||
|
if(this.dragClass){
|
||
|
dojo.html.addClass(node,this.dragClass);
|
||
|
}
|
||
|
if(this.opacity<1){
|
||
|
dojo.html.setOpacity(node,this.opacity);
|
||
|
}
|
||
|
var ltn=node.tagName.toLowerCase();
|
||
|
var isTr=(ltn=="tr");
|
||
|
if((isTr)||(ltn=="tbody")){
|
||
|
var doc=this.domNode.ownerDocument;
|
||
|
var _943=doc.createElement("table");
|
||
|
if(isTr){
|
||
|
var _944=doc.createElement("tbody");
|
||
|
_943.appendChild(_944);
|
||
|
_944.appendChild(node);
|
||
|
}else{
|
||
|
_943.appendChild(node);
|
||
|
}
|
||
|
var _945=((isTr)?this.domNode:this.domNode.firstChild);
|
||
|
var _946=((isTr)?node:node.firstChild);
|
||
|
var _947=_945.childNodes;
|
||
|
var _948=_946.childNodes;
|
||
|
for(var i=0;i<_947.length;i++){
|
||
|
if((_948[i])&&(_948[i].style)){
|
||
|
_948[i].style.width=dojo.html.getContentBox(_947[i]).width+"px";
|
||
|
}
|
||
|
}
|
||
|
node=_943;
|
||
|
}
|
||
|
if((dojo.render.html.ie55||dojo.render.html.ie60)&&this.createIframe){
|
||
|
with(node.style){
|
||
|
top="0px";
|
||
|
left="0px";
|
||
|
}
|
||
|
var _94a=document.createElement("div");
|
||
|
_94a.appendChild(node);
|
||
|
this.bgIframe=new dojo.html.BackgroundIframe(_94a);
|
||
|
_94a.appendChild(this.bgIframe.iframe);
|
||
|
node=_94a;
|
||
|
}
|
||
|
node.style.zIndex=999;
|
||
|
return node;
|
||
|
},onDragStart:function(e){
|
||
|
dojo.html.clearSelection();
|
||
|
this.scrollOffset=dojo.html.getScroll().offset;
|
||
|
this.dragStartPosition=dojo.html.getAbsolutePosition(this.domNode,true);
|
||
|
this.dragOffset={y:this.dragStartPosition.y-e.pageY,x:this.dragStartPosition.x-e.pageX};
|
||
|
this.dragClone=this.createDragNode();
|
||
|
this.containingBlockPosition=this.domNode.offsetParent?dojo.html.getAbsolutePosition(this.domNode.offsetParent,true):{x:0,y:0};
|
||
|
if(this.constrainToContainer){
|
||
|
this.constraints=this.getConstraints();
|
||
|
}
|
||
|
with(this.dragClone.style){
|
||
|
position="absolute";
|
||
|
top=this.dragOffset.y+e.pageY+"px";
|
||
|
left=this.dragOffset.x+e.pageX+"px";
|
||
|
}
|
||
|
dojo.body().appendChild(this.dragClone);
|
||
|
dojo.event.topic.publish("dragStart",{source:this});
|
||
|
},getConstraints:function(){
|
||
|
if(this.constrainingContainer.nodeName.toLowerCase()=="body"){
|
||
|
var _94c=dojo.html.getViewport();
|
||
|
var _94d=_94c.width;
|
||
|
var _94e=_94c.height;
|
||
|
var _94f=dojo.html.getScroll().offset;
|
||
|
var x=_94f.x;
|
||
|
var y=_94f.y;
|
||
|
}else{
|
||
|
var _952=dojo.html.getContentBox(this.constrainingContainer);
|
||
|
_94d=_952.width;
|
||
|
_94e=_952.height;
|
||
|
x=this.containingBlockPosition.x+dojo.html.getPixelValue(this.constrainingContainer,"padding-left",true)+dojo.html.getBorderExtent(this.constrainingContainer,"left");
|
||
|
y=this.containingBlockPosition.y+dojo.html.getPixelValue(this.constrainingContainer,"padding-top",true)+dojo.html.getBorderExtent(this.constrainingContainer,"top");
|
||
|
}
|
||
|
var mb=dojo.html.getMarginBox(this.domNode);
|
||
|
return {minX:x,minY:y,maxX:x+_94d-mb.width,maxY:y+_94e-mb.height};
|
||
|
},updateDragOffset:function(){
|
||
|
var _954=dojo.html.getScroll().offset;
|
||
|
if(_954.y!=this.scrollOffset.y){
|
||
|
var diff=_954.y-this.scrollOffset.y;
|
||
|
this.dragOffset.y+=diff;
|
||
|
this.scrollOffset.y=_954.y;
|
||
|
}
|
||
|
if(_954.x!=this.scrollOffset.x){
|
||
|
var diff=_954.x-this.scrollOffset.x;
|
||
|
this.dragOffset.x+=diff;
|
||
|
this.scrollOffset.x=_954.x;
|
||
|
}
|
||
|
},onDragMove:function(e){
|
||
|
this.updateDragOffset();
|
||
|
var x=this.dragOffset.x+e.pageX;
|
||
|
var y=this.dragOffset.y+e.pageY;
|
||
|
if(this.constrainToContainer){
|
||
|
if(x<this.constraints.minX){
|
||
|
x=this.constraints.minX;
|
||
|
}
|
||
|
if(y<this.constraints.minY){
|
||
|
y=this.constraints.minY;
|
||
|
}
|
||
|
if(x>this.constraints.maxX){
|
||
|
x=this.constraints.maxX;
|
||
|
}
|
||
|
if(y>this.constraints.maxY){
|
||
|
y=this.constraints.maxY;
|
||
|
}
|
||
|
}
|
||
|
this.setAbsolutePosition(x,y);
|
||
|
dojo.event.topic.publish("dragMove",{source:this});
|
||
|
},setAbsolutePosition:function(x,y){
|
||
|
if(!this.disableY){
|
||
|
this.dragClone.style.top=y+"px";
|
||
|
}
|
||
|
if(!this.disableX){
|
||
|
this.dragClone.style.left=x+"px";
|
||
|
}
|
||
|
},onDragEnd:function(e){
|
||
|
switch(e.dragStatus){
|
||
|
case "dropSuccess":
|
||
|
dojo.html.removeNode(this.dragClone);
|
||
|
this.dragClone=null;
|
||
|
break;
|
||
|
case "dropFailure":
|
||
|
var _95c=dojo.html.getAbsolutePosition(this.dragClone,true);
|
||
|
var _95d={left:this.dragStartPosition.x+1,top:this.dragStartPosition.y+1};
|
||
|
var anim=dojo.lfx.slideTo(this.dragClone,_95d,300);
|
||
|
var _95f=this;
|
||
|
dojo.event.connect(anim,"onEnd",function(e){
|
||
|
dojo.html.removeNode(_95f.dragClone);
|
||
|
_95f.dragClone=null;
|
||
|
});
|
||
|
anim.play();
|
||
|
break;
|
||
|
}
|
||
|
dojo.event.topic.publish("dragEnd",{source:this});
|
||
|
},constrainTo:function(_961){
|
||
|
this.constrainToContainer=true;
|
||
|
if(_961){
|
||
|
this.constrainingContainer=_961;
|
||
|
}else{
|
||
|
this.constrainingContainer=this.domNode.parentNode;
|
||
|
}
|
||
|
}},function(node,type){
|
||
|
this.domNode=dojo.byId(node);
|
||
|
this.type=type;
|
||
|
this.constrainToContainer=false;
|
||
|
this.dragSource=null;
|
||
|
dojo.dnd.DragObject.prototype.register.call(this);
|
||
|
});
|
||
|
dojo.declare("dojo.dnd.HtmlDropTarget",dojo.dnd.DropTarget,{vertical:false,onDragOver:function(e){
|
||
|
if(!this.accepts(e.dragObjects)){
|
||
|
return false;
|
||
|
}
|
||
|
this.childBoxes=[];
|
||
|
for(var i=0,_966;i<this.domNode.childNodes.length;i++){
|
||
|
_966=this.domNode.childNodes[i];
|
||
|
if(_966.nodeType!=dojo.html.ELEMENT_NODE){
|
||
|
continue;
|
||
|
}
|
||
|
var pos=dojo.html.getAbsolutePosition(_966,true);
|
||
|
var _968=dojo.html.getBorderBox(_966);
|
||
|
this.childBoxes.push({top:pos.y,bottom:pos.y+_968.height,left:pos.x,right:pos.x+_968.width,height:_968.height,width:_968.width,node:_966});
|
||
|
}
|
||
|
return true;
|
||
|
},_getNodeUnderMouse:function(e){
|
||
|
for(var i=0,_96b;i<this.childBoxes.length;i++){
|
||
|
with(this.childBoxes[i]){
|
||
|
if(e.pageX>=left&&e.pageX<=right&&e.pageY>=top&&e.pageY<=bottom){
|
||
|
return i;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return -1;
|
||
|
},createDropIndicator:function(){
|
||
|
this.dropIndicator=document.createElement("div");
|
||
|
with(this.dropIndicator.style){
|
||
|
position="absolute";
|
||
|
zIndex=999;
|
||
|
if(this.vertical){
|
||
|
borderLeftWidth="1px";
|
||
|
borderLeftColor="black";
|
||
|
borderLeftStyle="solid";
|
||
|
height=dojo.html.getBorderBox(this.domNode).height+"px";
|
||
|
top=dojo.html.getAbsolutePosition(this.domNode,true).y+"px";
|
||
|
}else{
|
||
|
borderTopWidth="1px";
|
||
|
borderTopColor="black";
|
||
|
borderTopStyle="solid";
|
||
|
width=dojo.html.getBorderBox(this.domNode).width+"px";
|
||
|
left=dojo.html.getAbsolutePosition(this.domNode,true).x+"px";
|
||
|
}
|
||
|
}
|
||
|
},onDragMove:function(e,_96d){
|
||
|
var i=this._getNodeUnderMouse(e);
|
||
|
if(!this.dropIndicator){
|
||
|
this.createDropIndicator();
|
||
|
}
|
||
|
var _96f=this.vertical?dojo.html.gravity.WEST:dojo.html.gravity.NORTH;
|
||
|
var hide=false;
|
||
|
if(i<0){
|
||
|
if(this.childBoxes.length){
|
||
|
var _971=(dojo.html.gravity(this.childBoxes[0].node,e)&_96f);
|
||
|
if(_971){
|
||
|
hide=true;
|
||
|
}
|
||
|
}else{
|
||
|
var _971=true;
|
||
|
}
|
||
|
}else{
|
||
|
var _972=this.childBoxes[i];
|
||
|
var _971=(dojo.html.gravity(_972.node,e)&_96f);
|
||
|
if(_972.node===_96d[0].dragSource.domNode){
|
||
|
hide=true;
|
||
|
}else{
|
||
|
var _973=_971?(i>0?this.childBoxes[i-1]:_972):(i<this.childBoxes.length-1?this.childBoxes[i+1]:_972);
|
||
|
if(_973.node===_96d[0].dragSource.domNode){
|
||
|
hide=true;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(hide){
|
||
|
this.dropIndicator.style.display="none";
|
||
|
return;
|
||
|
}else{
|
||
|
this.dropIndicator.style.display="";
|
||
|
}
|
||
|
this.placeIndicator(e,_96d,i,_971);
|
||
|
if(!dojo.html.hasParent(this.dropIndicator)){
|
||
|
dojo.body().appendChild(this.dropIndicator);
|
||
|
}
|
||
|
},placeIndicator:function(e,_975,_976,_977){
|
||
|
var _978=this.vertical?"left":"top";
|
||
|
var _979;
|
||
|
if(_976<0){
|
||
|
if(this.childBoxes.length){
|
||
|
_979=_977?this.childBoxes[0]:this.childBoxes[this.childBoxes.length-1];
|
||
|
}else{
|
||
|
this.dropIndicator.style[_978]=dojo.html.getAbsolutePosition(this.domNode,true)[this.vertical?"x":"y"]+"px";
|
||
|
}
|
||
|
}else{
|
||
|
_979=this.childBoxes[_976];
|
||
|
}
|
||
|
if(_979){
|
||
|
this.dropIndicator.style[_978]=(_977?_979[_978]:_979[this.vertical?"right":"bottom"])+"px";
|
||
|
if(this.vertical){
|
||
|
this.dropIndicator.style.height=_979.height+"px";
|
||
|
this.dropIndicator.style.top=_979.top+"px";
|
||
|
}else{
|
||
|
this.dropIndicator.style.width=_979.width+"px";
|
||
|
this.dropIndicator.style.left=_979.left+"px";
|
||
|
}
|
||
|
}
|
||
|
},onDragOut:function(e){
|
||
|
if(this.dropIndicator){
|
||
|
dojo.html.removeNode(this.dropIndicator);
|
||
|
delete this.dropIndicator;
|
||
|
}
|
||
|
},onDrop:function(e){
|
||
|
this.onDragOut(e);
|
||
|
var i=this._getNodeUnderMouse(e);
|
||
|
var _97d=this.vertical?dojo.html.gravity.WEST:dojo.html.gravity.NORTH;
|
||
|
if(i<0){
|
||
|
if(this.childBoxes.length){
|
||
|
if(dojo.html.gravity(this.childBoxes[0].node,e)&_97d){
|
||
|
return this.insert(e,this.childBoxes[0].node,"before");
|
||
|
}else{
|
||
|
return this.insert(e,this.childBoxes[this.childBoxes.length-1].node,"after");
|
||
|
}
|
||
|
}
|
||
|
return this.insert(e,this.domNode,"append");
|
||
|
}
|
||
|
var _97e=this.childBoxes[i];
|
||
|
if(dojo.html.gravity(_97e.node,e)&_97d){
|
||
|
return this.insert(e,_97e.node,"before");
|
||
|
}else{
|
||
|
return this.insert(e,_97e.node,"after");
|
||
|
}
|
||
|
},insert:function(e,_980,_981){
|
||
|
var node=e.dragObject.domNode;
|
||
|
if(_981=="before"){
|
||
|
return dojo.html.insertBefore(node,_980);
|
||
|
}else{
|
||
|
if(_981=="after"){
|
||
|
return dojo.html.insertAfter(node,_980);
|
||
|
}else{
|
||
|
if(_981=="append"){
|
||
|
_980.appendChild(node);
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
}},function(node,_984){
|
||
|
if(arguments.length==0){
|
||
|
return;
|
||
|
}
|
||
|
this.domNode=dojo.byId(node);
|
||
|
dojo.dnd.DropTarget.call(this);
|
||
|
if(_984&&dojo.lang.isString(_984)){
|
||
|
_984=[_984];
|
||
|
}
|
||
|
this.acceptedTypes=_984||[];
|
||
|
dojo.dnd.dragManager.registerDropTarget(this);
|
||
|
});
|
||
|
dojo.provide("dojo.dnd.TreeDragAndDrop");
|
||
|
dojo.dnd.TreeDragSource=function(node,_986,type,_988){
|
||
|
this.controller=_986;
|
||
|
this.treeNode=_988;
|
||
|
dojo.dnd.HtmlDragSource.call(this,node,type);
|
||
|
};
|
||
|
dojo.inherits(dojo.dnd.TreeDragSource,dojo.dnd.HtmlDragSource);
|
||
|
dojo.lang.extend(dojo.dnd.TreeDragSource,{onDragStart:function(){
|
||
|
var _989=dojo.dnd.HtmlDragSource.prototype.onDragStart.call(this);
|
||
|
_989.treeNode=this.treeNode;
|
||
|
_989.onDragStart=dojo.lang.hitch(_989,function(e){
|
||
|
this.savedSelectedNode=this.treeNode.tree.selector.selectedNode;
|
||
|
if(this.savedSelectedNode){
|
||
|
this.savedSelectedNode.unMarkSelected();
|
||
|
}
|
||
|
var _98b=dojo.dnd.HtmlDragObject.prototype.onDragStart.apply(this,arguments);
|
||
|
var _98c=this.dragClone.getElementsByTagName("img");
|
||
|
for(var i=0;i<_98c.length;i++){
|
||
|
_98c.item(i).style.backgroundImage="url()";
|
||
|
}
|
||
|
return _98b;
|
||
|
});
|
||
|
_989.onDragEnd=function(e){
|
||
|
if(this.savedSelectedNode){
|
||
|
this.savedSelectedNode.markSelected();
|
||
|
}
|
||
|
return dojo.dnd.HtmlDragObject.prototype.onDragEnd.apply(this,arguments);
|
||
|
};
|
||
|
return _989;
|
||
|
},onDragEnd:function(e){
|
||
|
var res=dojo.dnd.HtmlDragSource.prototype.onDragEnd.call(this,e);
|
||
|
return res;
|
||
|
}});
|
||
|
dojo.dnd.TreeDropTarget=function(_991,_992,type,_994){
|
||
|
this.treeNode=_994;
|
||
|
this.controller=_992;
|
||
|
dojo.dnd.HtmlDropTarget.apply(this,[_991,type]);
|
||
|
};
|
||
|
dojo.inherits(dojo.dnd.TreeDropTarget,dojo.dnd.HtmlDropTarget);
|
||
|
dojo.lang.extend(dojo.dnd.TreeDropTarget,{autoExpandDelay:1500,autoExpandTimer:null,position:null,indicatorStyle:"2px black solid",showIndicator:function(_995){
|
||
|
if(this.position==_995){
|
||
|
return;
|
||
|
}
|
||
|
this.hideIndicator();
|
||
|
this.position=_995;
|
||
|
if(_995=="before"){
|
||
|
this.treeNode.labelNode.style.borderTop=this.indicatorStyle;
|
||
|
}else{
|
||
|
if(_995=="after"){
|
||
|
this.treeNode.labelNode.style.borderBottom=this.indicatorStyle;
|
||
|
}else{
|
||
|
if(_995=="onto"){
|
||
|
this.treeNode.markSelected();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},hideIndicator:function(){
|
||
|
this.treeNode.labelNode.style.borderBottom="";
|
||
|
this.treeNode.labelNode.style.borderTop="";
|
||
|
this.treeNode.unMarkSelected();
|
||
|
this.position=null;
|
||
|
},onDragOver:function(e){
|
||
|
var _997=dojo.dnd.HtmlDropTarget.prototype.onDragOver.apply(this,arguments);
|
||
|
if(_997&&this.treeNode.isFolder&&!this.treeNode.isExpanded){
|
||
|
this.setAutoExpandTimer();
|
||
|
}
|
||
|
return _997;
|
||
|
},accepts:function(_998){
|
||
|
var _999=dojo.dnd.HtmlDropTarget.prototype.accepts.apply(this,arguments);
|
||
|
if(!_999){
|
||
|
return false;
|
||
|
}
|
||
|
var _99a=_998[0].treeNode;
|
||
|
if(dojo.lang.isUndefined(_99a)||!_99a||!_99a.isTreeNode){
|
||
|
dojo.raise("Source is not TreeNode or not found");
|
||
|
}
|
||
|
if(_99a===this.treeNode){
|
||
|
return false;
|
||
|
}
|
||
|
return true;
|
||
|
},setAutoExpandTimer:function(){
|
||
|
var _99b=this;
|
||
|
var _99c=function(){
|
||
|
if(dojo.dnd.dragManager.currentDropTarget===_99b){
|
||
|
_99b.controller.expand(_99b.treeNode);
|
||
|
}
|
||
|
};
|
||
|
this.autoExpandTimer=dojo.lang.setTimeout(_99c,_99b.autoExpandDelay);
|
||
|
},getDNDMode:function(){
|
||
|
return this.treeNode.tree.DNDMode;
|
||
|
},getAcceptPosition:function(e,_99e){
|
||
|
var _99f=this.getDNDMode();
|
||
|
if(_99f&dojo.widget.Tree.prototype.DNDModes.ONTO&&!(!this.treeNode.actionIsDisabled(dojo.widget.TreeNode.prototype.actions.ADDCHILD)&&_99e.parent!==this.treeNode&&this.controller.canMove(_99e,this.treeNode))){
|
||
|
_99f&=~dojo.widget.Tree.prototype.DNDModes.ONTO;
|
||
|
}
|
||
|
var _9a0=this.getPosition(e,_99f);
|
||
|
if(_9a0=="onto"||(!this.isAdjacentNode(_99e,_9a0)&&this.controller.canMove(_99e,this.treeNode.parent))){
|
||
|
return _9a0;
|
||
|
}else{
|
||
|
return false;
|
||
|
}
|
||
|
},onDragOut:function(e){
|
||
|
this.clearAutoExpandTimer();
|
||
|
this.hideIndicator();
|
||
|
},clearAutoExpandTimer:function(){
|
||
|
if(this.autoExpandTimer){
|
||
|
clearTimeout(this.autoExpandTimer);
|
||
|
this.autoExpandTimer=null;
|
||
|
}
|
||
|
},onDragMove:function(e,_9a3){
|
||
|
var _9a4=_9a3[0].treeNode;
|
||
|
var _9a5=this.getAcceptPosition(e,_9a4);
|
||
|
if(_9a5){
|
||
|
this.showIndicator(_9a5);
|
||
|
}
|
||
|
},isAdjacentNode:function(_9a6,_9a7){
|
||
|
if(_9a6===this.treeNode){
|
||
|
return true;
|
||
|
}
|
||
|
if(_9a6.getNextSibling()===this.treeNode&&_9a7=="before"){
|
||
|
return true;
|
||
|
}
|
||
|
if(_9a6.getPreviousSibling()===this.treeNode&&_9a7=="after"){
|
||
|
return true;
|
||
|
}
|
||
|
return false;
|
||
|
},getPosition:function(e,_9a9){
|
||
|
var node=dojo.byId(this.treeNode.labelNode);
|
||
|
var _9ab=e.pageY||e.clientY+dojo.body().scrollTop;
|
||
|
var _9ac=dojo.html.getAbsolutePosition(node).y;
|
||
|
var _9ad=dojo.html.getBorderBox(node).height;
|
||
|
var relY=_9ab-_9ac;
|
||
|
var p=relY/_9ad;
|
||
|
var _9b0="";
|
||
|
if(_9a9&dojo.widget.Tree.prototype.DNDModes.ONTO&&_9a9&dojo.widget.Tree.prototype.DNDModes.BETWEEN){
|
||
|
if(p<=0.3){
|
||
|
_9b0="before";
|
||
|
}else{
|
||
|
if(p<=0.7){
|
||
|
_9b0="onto";
|
||
|
}else{
|
||
|
_9b0="after";
|
||
|
}
|
||
|
}
|
||
|
}else{
|
||
|
if(_9a9&dojo.widget.Tree.prototype.DNDModes.BETWEEN){
|
||
|
if(p<=0.5){
|
||
|
_9b0="before";
|
||
|
}else{
|
||
|
_9b0="after";
|
||
|
}
|
||
|
}else{
|
||
|
if(_9a9&dojo.widget.Tree.prototype.DNDModes.ONTO){
|
||
|
_9b0="onto";
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return _9b0;
|
||
|
},getTargetParentIndex:function(_9b1,_9b2){
|
||
|
var _9b3=_9b2=="before"?this.treeNode.getParentIndex():this.treeNode.getParentIndex()+1;
|
||
|
if(this.treeNode.parent===_9b1.parent&&this.treeNode.getParentIndex()>_9b1.getParentIndex()){
|
||
|
_9b3--;
|
||
|
}
|
||
|
return _9b3;
|
||
|
},onDrop:function(e){
|
||
|
var _9b5=this.position;
|
||
|
this.onDragOut(e);
|
||
|
var _9b6=e.dragObject.treeNode;
|
||
|
if(!dojo.lang.isObject(_9b6)){
|
||
|
dojo.raise("TreeNode not found in dragObject");
|
||
|
}
|
||
|
if(_9b5=="onto"){
|
||
|
return this.controller.move(_9b6,this.treeNode,0);
|
||
|
}else{
|
||
|
var _9b7=this.getTargetParentIndex(_9b6,_9b5);
|
||
|
return this.controller.move(_9b6,this.treeNode.parent,_9b7);
|
||
|
}
|
||
|
}});
|
||
|
dojo.dnd.TreeDNDController=function(_9b8){
|
||
|
this.treeController=_9b8;
|
||
|
this.dragSources={};
|
||
|
this.dropTargets={};
|
||
|
};
|
||
|
dojo.lang.extend(dojo.dnd.TreeDNDController,{listenTree:function(tree){
|
||
|
dojo.event.topic.subscribe(tree.eventNames.createDOMNode,this,"onCreateDOMNode");
|
||
|
dojo.event.topic.subscribe(tree.eventNames.moveFrom,this,"onMoveFrom");
|
||
|
dojo.event.topic.subscribe(tree.eventNames.moveTo,this,"onMoveTo");
|
||
|
dojo.event.topic.subscribe(tree.eventNames.addChild,this,"onAddChild");
|
||
|
dojo.event.topic.subscribe(tree.eventNames.removeNode,this,"onRemoveNode");
|
||
|
dojo.event.topic.subscribe(tree.eventNames.treeDestroy,this,"onTreeDestroy");
|
||
|
},unlistenTree:function(tree){
|
||
|
dojo.event.topic.unsubscribe(tree.eventNames.createDOMNode,this,"onCreateDOMNode");
|
||
|
dojo.event.topic.unsubscribe(tree.eventNames.moveFrom,this,"onMoveFrom");
|
||
|
dojo.event.topic.unsubscribe(tree.eventNames.moveTo,this,"onMoveTo");
|
||
|
dojo.event.topic.unsubscribe(tree.eventNames.addChild,this,"onAddChild");
|
||
|
dojo.event.topic.unsubscribe(tree.eventNames.removeNode,this,"onRemoveNode");
|
||
|
dojo.event.topic.unsubscribe(tree.eventNames.treeDestroy,this,"onTreeDestroy");
|
||
|
},onTreeDestroy:function(_9bb){
|
||
|
this.unlistenTree(_9bb.source);
|
||
|
},onCreateDOMNode:function(_9bc){
|
||
|
this.registerDNDNode(_9bc.source);
|
||
|
},onAddChild:function(_9bd){
|
||
|
this.registerDNDNode(_9bd.child);
|
||
|
},onMoveFrom:function(_9be){
|
||
|
var _9bf=this;
|
||
|
dojo.lang.forEach(_9be.child.getDescendants(),function(node){
|
||
|
_9bf.unregisterDNDNode(node);
|
||
|
});
|
||
|
},onMoveTo:function(_9c1){
|
||
|
var _9c2=this;
|
||
|
dojo.lang.forEach(_9c1.child.getDescendants(),function(node){
|
||
|
_9c2.registerDNDNode(node);
|
||
|
});
|
||
|
},registerDNDNode:function(node){
|
||
|
if(!node.tree.DNDMode){
|
||
|
return;
|
||
|
}
|
||
|
var _9c5=null;
|
||
|
var _9c6=null;
|
||
|
if(!node.actionIsDisabled(node.actions.MOVE)){
|
||
|
var _9c5=new dojo.dnd.TreeDragSource(node.labelNode,this,node.tree.widgetId,node);
|
||
|
this.dragSources[node.widgetId]=_9c5;
|
||
|
}
|
||
|
var _9c6=new dojo.dnd.TreeDropTarget(node.labelNode,this.treeController,node.tree.DNDAcceptTypes,node);
|
||
|
this.dropTargets[node.widgetId]=_9c6;
|
||
|
},unregisterDNDNode:function(node){
|
||
|
if(this.dragSources[node.widgetId]){
|
||
|
dojo.dnd.dragManager.unregisterDragSource(this.dragSources[node.widgetId]);
|
||
|
delete this.dragSources[node.widgetId];
|
||
|
}
|
||
|
if(this.dropTargets[node.widgetId]){
|
||
|
dojo.dnd.dragManager.unregisterDropTarget(this.dropTargets[node.widgetId]);
|
||
|
delete this.dropTargets[node.widgetId];
|
||
|
}
|
||
|
}});
|
||
|
dojo.provide("dojo.widget.TreeBasicController");
|
||
|
dojo.widget.defineWidget("dojo.widget.TreeBasicController",dojo.widget.HtmlWidget,{widgetType:"TreeBasicController",DNDController:"",dieWithTree:false,initialize:function(args,frag){
|
||
|
if(this.DNDController=="create"){
|
||
|
this.DNDController=new dojo.dnd.TreeDNDController(this);
|
||
|
}
|
||
|
},listenTree:function(tree){
|
||
|
dojo.event.topic.subscribe(tree.eventNames.createDOMNode,this,"onCreateDOMNode");
|
||
|
dojo.event.topic.subscribe(tree.eventNames.treeClick,this,"onTreeClick");
|
||
|
dojo.event.topic.subscribe(tree.eventNames.treeCreate,this,"onTreeCreate");
|
||
|
dojo.event.topic.subscribe(tree.eventNames.treeDestroy,this,"onTreeDestroy");
|
||
|
if(this.DNDController){
|
||
|
this.DNDController.listenTree(tree);
|
||
|
}
|
||
|
},unlistenTree:function(tree){
|
||
|
dojo.event.topic.unsubscribe(tree.eventNames.createDOMNode,this,"onCreateDOMNode");
|
||
|
dojo.event.topic.unsubscribe(tree.eventNames.treeClick,this,"onTreeClick");
|
||
|
dojo.event.topic.unsubscribe(tree.eventNames.treeCreate,this,"onTreeCreate");
|
||
|
dojo.event.topic.unsubscribe(tree.eventNames.treeDestroy,this,"onTreeDestroy");
|
||
|
},onTreeDestroy:function(_9cc){
|
||
|
var tree=_9cc.source;
|
||
|
this.unlistenTree(tree);
|
||
|
if(this.dieWithTree){
|
||
|
this.destroy();
|
||
|
}
|
||
|
},onCreateDOMNode:function(_9ce){
|
||
|
var node=_9ce.source;
|
||
|
if(node.expandLevel>0){
|
||
|
this.expandToLevel(node,node.expandLevel);
|
||
|
}
|
||
|
},onTreeCreate:function(_9d0){
|
||
|
var tree=_9d0.source;
|
||
|
var _9d2=this;
|
||
|
if(tree.expandLevel){
|
||
|
dojo.lang.forEach(tree.children,function(_9d3){
|
||
|
_9d2.expandToLevel(_9d3,tree.expandLevel-1);
|
||
|
});
|
||
|
}
|
||
|
},expandToLevel:function(node,_9d5){
|
||
|
if(_9d5==0){
|
||
|
return;
|
||
|
}
|
||
|
var _9d6=node.children;
|
||
|
var _9d7=this;
|
||
|
var _9d8=function(node,_9da){
|
||
|
this.node=node;
|
||
|
this.expandLevel=_9da;
|
||
|
this.process=function(){
|
||
|
for(var i=0;i<this.node.children.length;i++){
|
||
|
var _9dc=node.children[i];
|
||
|
_9d7.expandToLevel(_9dc,this.expandLevel);
|
||
|
}
|
||
|
};
|
||
|
};
|
||
|
var h=new _9d8(node,_9d5-1);
|
||
|
this.expand(node,false,h,h.process);
|
||
|
},onTreeClick:function(_9de){
|
||
|
var node=_9de.source;
|
||
|
if(node.isLocked()){
|
||
|
return false;
|
||
|
}
|
||
|
if(node.isExpanded){
|
||
|
this.collapse(node);
|
||
|
}else{
|
||
|
this.expand(node);
|
||
|
}
|
||
|
},expand:function(node,sync,_9e2,_9e3){
|
||
|
node.expand();
|
||
|
if(_9e3){
|
||
|
_9e3.apply(_9e2,[node]);
|
||
|
}
|
||
|
},collapse:function(node){
|
||
|
node.collapse();
|
||
|
},canMove:function(_9e5,_9e6){
|
||
|
if(_9e5.actionIsDisabled(_9e5.actions.MOVE)){
|
||
|
return false;
|
||
|
}
|
||
|
if(_9e5.parent!==_9e6&&_9e6.actionIsDisabled(_9e6.actions.ADDCHILD)){
|
||
|
return false;
|
||
|
}
|
||
|
var node=_9e6;
|
||
|
while(node.isTreeNode){
|
||
|
if(node===_9e5){
|
||
|
return false;
|
||
|
}
|
||
|
node=node.parent;
|
||
|
}
|
||
|
return true;
|
||
|
},move:function(_9e8,_9e9,_9ea){
|
||
|
if(!this.canMove(_9e8,_9e9)){
|
||
|
return false;
|
||
|
}
|
||
|
var _9eb=this.doMove(_9e8,_9e9,_9ea);
|
||
|
if(!_9eb){
|
||
|
return _9eb;
|
||
|
}
|
||
|
if(_9e9.isTreeNode){
|
||
|
this.expand(_9e9);
|
||
|
}
|
||
|
return _9eb;
|
||
|
},doMove:function(_9ec,_9ed,_9ee){
|
||
|
_9ec.tree.move(_9ec,_9ed,_9ee);
|
||
|
return true;
|
||
|
},canRemoveNode:function(_9ef){
|
||
|
if(_9ef.actionIsDisabled(_9ef.actions.REMOVE)){
|
||
|
return false;
|
||
|
}
|
||
|
return true;
|
||
|
},removeNode:function(node,_9f1,_9f2){
|
||
|
if(!this.canRemoveNode(node)){
|
||
|
return false;
|
||
|
}
|
||
|
return this.doRemoveNode(node,_9f1,_9f2);
|
||
|
},doRemoveNode:function(node,_9f4,_9f5){
|
||
|
node.tree.removeNode(node);
|
||
|
if(_9f5){
|
||
|
_9f5.apply(dojo.lang.isUndefined(_9f4)?this:_9f4,[node]);
|
||
|
}
|
||
|
},canCreateChild:function(_9f6,_9f7,data){
|
||
|
if(_9f6.actionIsDisabled(_9f6.actions.ADDCHILD)){
|
||
|
return false;
|
||
|
}
|
||
|
return true;
|
||
|
},createChild:function(_9f9,_9fa,data,_9fc,_9fd){
|
||
|
if(!this.canCreateChild(_9f9,_9fa,data)){
|
||
|
return false;
|
||
|
}
|
||
|
return this.doCreateChild.apply(this,arguments);
|
||
|
},doCreateChild:function(_9fe,_9ff,data,_a01,_a02){
|
||
|
var _a03=data.widgetType?data.widgetType:"TreeNode";
|
||
|
var _a04=dojo.widget.createWidget(_a03,data);
|
||
|
_9fe.addChild(_a04,_9ff);
|
||
|
this.expand(_9fe);
|
||
|
if(_a02){
|
||
|
_a02.apply(_a01,[_a04]);
|
||
|
}
|
||
|
return _a04;
|
||
|
}});
|
||
|
dojo.provide("dojo.widget.TreeCommon");
|
||
|
dojo.declare("dojo.widget.TreeCommon",null,{listenTreeEvents:[],listenedTrees:{},listenNodeFilter:null,listenTree:function(tree){
|
||
|
var _a06=this;
|
||
|
if(this.listenedTrees[tree.widgetId]){
|
||
|
return;
|
||
|
}
|
||
|
dojo.lang.forEach(this.listenTreeEvents,function(_a07){
|
||
|
var _a08="on"+_a07.charAt(0).toUpperCase()+_a07.substr(1);
|
||
|
dojo.event.topic.subscribe(tree.eventNames[_a07],_a06,_a08);
|
||
|
});
|
||
|
var _a09;
|
||
|
if(this.listenNodeFilter){
|
||
|
this.processDescendants(tree,this.listenNodeFilter,this.listenNode,true);
|
||
|
}
|
||
|
this.listenedTrees[tree.widgetId]=true;
|
||
|
},listenNode:function(){
|
||
|
},unlistenNode:function(){
|
||
|
},unlistenTree:function(tree,_a0b){
|
||
|
var _a0c=this;
|
||
|
if(!this.listenedTrees[tree.widgetId]){
|
||
|
return;
|
||
|
}
|
||
|
dojo.lang.forEach(this.listenTreeEvents,function(_a0d){
|
||
|
var _a0e="on"+_a0d.charAt(0).toUpperCase()+_a0d.substr(1);
|
||
|
dojo.event.topic.unsubscribe(tree.eventNames[_a0d],_a0c,_a0e);
|
||
|
});
|
||
|
if(this.listenNodeFilter){
|
||
|
this.processDescendants(tree,this.listenNodeFilter,this.unlistenNode,true);
|
||
|
}
|
||
|
delete this.listenedTrees[tree.widgetId];
|
||
|
},checkPathCondition:function(_a0f,_a10){
|
||
|
while(_a0f&&!_a0f.widgetId){
|
||
|
if(_a10.call(null,_a0f)){
|
||
|
return true;
|
||
|
}
|
||
|
_a0f=_a0f.parentNode;
|
||
|
}
|
||
|
return false;
|
||
|
},domElement2TreeNode:function(_a11){
|
||
|
while(_a11&&!_a11.widgetId){
|
||
|
_a11=_a11.parentNode;
|
||
|
}
|
||
|
if(!_a11){
|
||
|
return null;
|
||
|
}
|
||
|
var _a12=dojo.widget.byId(_a11.widgetId);
|
||
|
if(!_a12.isTreeNode){
|
||
|
return null;
|
||
|
}
|
||
|
return _a12;
|
||
|
},processDescendants:function(elem,_a14,func,_a16){
|
||
|
var _a17=this;
|
||
|
if(!_a16){
|
||
|
if(!_a14.call(_a17,elem)){
|
||
|
return;
|
||
|
}
|
||
|
func.call(_a17,elem);
|
||
|
}
|
||
|
var _a18=[elem];
|
||
|
while(elem=_a18.pop()){
|
||
|
dojo.lang.forEach(elem.children,function(elem){
|
||
|
if(_a14.call(_a17,elem)){
|
||
|
func.call(_a17,elem);
|
||
|
_a18.push(elem);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}});
|
||
|
dojo.provide("dojo.widget.TreeSelectorV3");
|
||
|
dojo.widget.defineWidget("dojo.widget.TreeSelectorV3",[dojo.widget.HtmlWidget,dojo.widget.TreeCommon],function(){
|
||
|
this.eventNames={};
|
||
|
this.listenedTrees={};
|
||
|
this.selectedNodes=[];
|
||
|
this.lastClicked={};
|
||
|
},{listenTreeEvents:["afterTreeCreate","afterCollapse","afterChangeTree","afterDetach","beforeTreeDestroy"],listenNodeFilter:function(elem){
|
||
|
return elem instanceof dojo.widget.Widget;
|
||
|
},allowedMulti:true,dblselectTimeout:300,eventNamesDefault:{select:"select",deselect:"deselect",dblselect:"dblselect"},onAfterTreeCreate:function(_a1b){
|
||
|
var tree=_a1b.source;
|
||
|
dojo.event.browser.addListener(tree.domNode,"onclick",dojo.lang.hitch(this,this.onTreeClick));
|
||
|
if(dojo.render.html.ie){
|
||
|
dojo.event.browser.addListener(tree.domNode,"ondblclick",dojo.lang.hitch(this,this.onTreeDblClick));
|
||
|
}
|
||
|
dojo.event.browser.addListener(tree.domNode,"onKey",dojo.lang.hitch(this,this.onKey));
|
||
|
},onKey:function(e){
|
||
|
if(!e.key||e.ctrkKey||e.altKey){
|
||
|
return;
|
||
|
}
|
||
|
switch(e.key){
|
||
|
case e.KEY_ENTER:
|
||
|
var node=this.domElement2TreeNode(e.target);
|
||
|
if(node){
|
||
|
this.processNode(node,e);
|
||
|
}
|
||
|
}
|
||
|
},onAfterChangeTree:function(_a1f){
|
||
|
if(!_a1f.oldTree&&_a1f.node.selected){
|
||
|
this.select(_a1f.node);
|
||
|
}
|
||
|
if(!_a1f.newTree||!this.listenedTrees[_a1f.newTree.widgetId]){
|
||
|
if(this.selectedNode&&_a1f.node.children){
|
||
|
this.deselectIfAncestorMatch(_a1f.node);
|
||
|
}
|
||
|
}
|
||
|
},initialize:function(args){
|
||
|
for(var name in this.eventNamesDefault){
|
||
|
if(dojo.lang.isUndefined(this.eventNames[name])){
|
||
|
this.eventNames[name]=this.widgetId+"/"+this.eventNamesDefault[name];
|
||
|
}
|
||
|
}
|
||
|
},onBeforeTreeDestroy:function(_a22){
|
||
|
this.unlistenTree(_a22.source);
|
||
|
},onAfterCollapse:function(_a23){
|
||
|
this.deselectIfAncestorMatch(_a23.source);
|
||
|
},onTreeDblClick:function(_a24){
|
||
|
this.onTreeClick(_a24);
|
||
|
},checkSpecialEvent:function(_a25){
|
||
|
return _a25.shiftKey||_a25.ctrlKey;
|
||
|
},onTreeClick:function(_a26){
|
||
|
var node=this.domElement2TreeNode(_a26.target);
|
||
|
if(!node){
|
||
|
return;
|
||
|
}
|
||
|
var _a28=function(_a29){
|
||
|
return _a29===node.labelNode;
|
||
|
};
|
||
|
if(this.checkPathCondition(_a26.target,_a28)){
|
||
|
this.processNode(node,_a26);
|
||
|
}
|
||
|
},processNode:function(node,_a2b){
|
||
|
if(node.actionIsDisabled(node.actions.SELECT)){
|
||
|
return;
|
||
|
}
|
||
|
if(dojo.lang.inArray(this.selectedNodes,node)){
|
||
|
if(this.checkSpecialEvent(_a2b)){
|
||
|
this.deselect(node);
|
||
|
return;
|
||
|
}
|
||
|
var _a2c=this;
|
||
|
var i=0;
|
||
|
var _a2e;
|
||
|
while(this.selectedNodes.length>i){
|
||
|
_a2e=this.selectedNodes[i];
|
||
|
if(_a2e!==node){
|
||
|
this.deselect(_a2e);
|
||
|
continue;
|
||
|
}
|
||
|
i++;
|
||
|
}
|
||
|
var _a2f=this.checkRecentClick(node);
|
||
|
eventName=_a2f?this.eventNames.dblselect:this.eventNames.select;
|
||
|
if(_a2f){
|
||
|
eventName=this.eventNames.dblselect;
|
||
|
this.forgetLastClicked();
|
||
|
}else{
|
||
|
eventName=this.eventNames.select;
|
||
|
this.setLastClicked(node);
|
||
|
}
|
||
|
dojo.event.topic.publish(eventName,{node:node});
|
||
|
return;
|
||
|
}
|
||
|
this.deselectIfNoMulti(_a2b);
|
||
|
this.setLastClicked(node);
|
||
|
this.select(node);
|
||
|
},forgetLastClicked:function(){
|
||
|
this.lastClicked={};
|
||
|
},setLastClicked:function(node){
|
||
|
this.lastClicked.date=new Date();
|
||
|
this.lastClicked.node=node;
|
||
|
},checkRecentClick:function(node){
|
||
|
var diff=new Date()-this.lastClicked.date;
|
||
|
if(this.lastClicked.node&&diff<this.dblselectTimeout){
|
||
|
return true;
|
||
|
}else{
|
||
|
return false;
|
||
|
}
|
||
|
},deselectIfNoMulti:function(_a33){
|
||
|
if(!this.checkSpecialEvent(_a33)||!this.allowedMulti){
|
||
|
this.deselectAll();
|
||
|
}
|
||
|
},deselectIfAncestorMatch:function(_a34){
|
||
|
var _a35=this;
|
||
|
dojo.lang.forEach(this.selectedNodes,function(node){
|
||
|
var _a37=node;
|
||
|
node=node.parent;
|
||
|
while(node&&node.isTreeNode){
|
||
|
if(node===_a34){
|
||
|
_a35.deselect(_a37);
|
||
|
return;
|
||
|
}
|
||
|
node=node.parent;
|
||
|
}
|
||
|
});
|
||
|
},onAfterDetach:function(_a38){
|
||
|
this.deselectIfAncestorMatch(_a38.child);
|
||
|
},select:function(node){
|
||
|
var _a3a=dojo.lang.find(this.selectedNodes,node,true);
|
||
|
if(_a3a>=0){
|
||
|
return;
|
||
|
}
|
||
|
this.selectedNodes.push(node);
|
||
|
dojo.event.topic.publish(this.eventNames.select,{node:node});
|
||
|
},deselect:function(node){
|
||
|
var _a3c=dojo.lang.find(this.selectedNodes,node,true);
|
||
|
if(_a3c<0){
|
||
|
return;
|
||
|
}
|
||
|
this.selectedNodes.splice(_a3c,1);
|
||
|
dojo.event.topic.publish(this.eventNames.deselect,{node:node});
|
||
|
},deselectAll:function(){
|
||
|
while(this.selectedNodes.length){
|
||
|
this.deselect(this.selectedNodes[0]);
|
||
|
}
|
||
|
}});
|
||
|
dojo.provide("dojo.widget.TreeEmphasizeOnSelect");
|
||
|
dojo.widget.defineWidget("dojo.widget.TreeEmphasizeOnSelect",dojo.widget.HtmlWidget,{selector:"",initialize:function(){
|
||
|
this.selector=dojo.widget.byId(this.selector);
|
||
|
dojo.event.topic.subscribe(this.selector.eventNames.select,this,"onSelect");
|
||
|
dojo.event.topic.subscribe(this.selector.eventNames.deselect,this,"onDeselect");
|
||
|
},onSelect:function(_a3d){
|
||
|
_a3d.node.viewEmphasize();
|
||
|
},onDeselect:function(_a3e){
|
||
|
_a3e.node.viewUnemphasize();
|
||
|
}});
|
||
|
dojo.provide("dojo.widget.ContentPane");
|
||
|
dojo.widget.defineWidget("dojo.widget.ContentPane",dojo.widget.HtmlWidget,function(){
|
||
|
this._styleNodes=[];
|
||
|
this._onLoadStack=[];
|
||
|
this._onUnloadStack=[];
|
||
|
this._callOnUnload=false;
|
||
|
this._ioBindObj;
|
||
|
this.scriptScope;
|
||
|
this.bindArgs={};
|
||
|
},{isContainer:true,adjustPaths:true,href:"",extractContent:true,parseContent:true,cacheContent:true,preload:false,refreshOnShow:false,handler:"",executeScripts:false,scriptSeparation:true,loadingMessage:"Loading...",isLoaded:false,postCreate:function(args,frag,_a41){
|
||
|
if(this.handler!==""){
|
||
|
this.setHandler(this.handler);
|
||
|
}
|
||
|
if(this.isShowing()||this.preload){
|
||
|
this.loadContents();
|
||
|
}
|
||
|
},show:function(){
|
||
|
if(this.refreshOnShow){
|
||
|
this.refresh();
|
||
|
}else{
|
||
|
this.loadContents();
|
||
|
}
|
||
|
dojo.widget.ContentPane.superclass.show.call(this);
|
||
|
},refresh:function(){
|
||
|
this.isLoaded=false;
|
||
|
this.loadContents();
|
||
|
},loadContents:function(){
|
||
|
if(this.isLoaded){
|
||
|
return;
|
||
|
}
|
||
|
if(dojo.lang.isFunction(this.handler)){
|
||
|
this._runHandler();
|
||
|
}else{
|
||
|
if(this.href!=""){
|
||
|
this._downloadExternalContent(this.href,this.cacheContent&&!this.refreshOnShow);
|
||
|
}
|
||
|
}
|
||
|
},setUrl:function(url){
|
||
|
this.href=url;
|
||
|
this.isLoaded=false;
|
||
|
if(this.preload||this.isShowing()){
|
||
|
this.loadContents();
|
||
|
}
|
||
|
},abort:function(){
|
||
|
var bind=this._ioBindObj;
|
||
|
if(!bind||!bind.abort){
|
||
|
return;
|
||
|
}
|
||
|
bind.abort();
|
||
|
delete this._ioBindObj;
|
||
|
},_downloadExternalContent:function(url,_a45){
|
||
|
this.abort();
|
||
|
this._handleDefaults(this.loadingMessage,"onDownloadStart");
|
||
|
var self=this;
|
||
|
this._ioBindObj=dojo.io.bind(this._cacheSetting({url:url,mimetype:"text/html",handler:function(type,data,xhr){
|
||
|
delete self._ioBindObj;
|
||
|
if(type=="load"){
|
||
|
self.onDownloadEnd.call(self,url,data);
|
||
|
}else{
|
||
|
var e={responseText:xhr.responseText,status:xhr.status,statusText:xhr.statusText,responseHeaders:xhr.getAllResponseHeaders(),text:"Error loading '"+url+"' ("+xhr.status+" "+xhr.statusText+")"};
|
||
|
self._handleDefaults.call(self,e,"onDownloadError");
|
||
|
self.onLoad();
|
||
|
}
|
||
|
}},_a45));
|
||
|
},_cacheSetting:function(_a4b,_a4c){
|
||
|
for(var x in this.bindArgs){
|
||
|
if(dojo.lang.isUndefined(_a4b[x])){
|
||
|
_a4b[x]=this.bindArgs[x];
|
||
|
}
|
||
|
}
|
||
|
if(dojo.lang.isUndefined(_a4b.useCache)){
|
||
|
_a4b.useCache=_a4c;
|
||
|
}
|
||
|
if(dojo.lang.isUndefined(_a4b.preventCache)){
|
||
|
_a4b.preventCache=!_a4c;
|
||
|
}
|
||
|
if(dojo.lang.isUndefined(_a4b.mimetype)){
|
||
|
_a4b.mimetype="text/html";
|
||
|
}
|
||
|
return _a4b;
|
||
|
},onLoad:function(e){
|
||
|
this._runStack("_onLoadStack");
|
||
|
this.isLoaded=true;
|
||
|
},onUnLoad:function(e){
|
||
|
dojo.deprecated(this.widgetType+".onUnLoad, use .onUnload (lowercased load)",0.5);
|
||
|
},onUnload:function(e){
|
||
|
this._runStack("_onUnloadStack");
|
||
|
delete this.scriptScope;
|
||
|
if(this.onUnLoad!==dojo.widget.ContentPane.prototype.onUnLoad){
|
||
|
this.onUnLoad.apply(this,arguments);
|
||
|
}
|
||
|
},_runStack:function(_a51){
|
||
|
var st=this[_a51];
|
||
|
var err="";
|
||
|
var _a54=this.scriptScope||window;
|
||
|
for(var i=0;i<st.length;i++){
|
||
|
try{
|
||
|
st[i].call(_a54);
|
||
|
}
|
||
|
catch(e){
|
||
|
err+="\n"+st[i]+" failed: "+e.description;
|
||
|
}
|
||
|
}
|
||
|
this[_a51]=[];
|
||
|
if(err.length){
|
||
|
var name=(_a51=="_onLoadStack")?"addOnLoad":"addOnUnLoad";
|
||
|
this._handleDefaults(name+" failure\n "+err,"onExecError","debug");
|
||
|
}
|
||
|
},addOnLoad:function(obj,func){
|
||
|
this._pushOnStack(this._onLoadStack,obj,func);
|
||
|
},addOnUnload:function(obj,func){
|
||
|
this._pushOnStack(this._onUnloadStack,obj,func);
|
||
|
},addOnUnLoad:function(){
|
||
|
dojo.deprecated(this.widgetType+".addOnUnLoad, use addOnUnload instead. (lowercased Load)",0.5);
|
||
|
this.addOnUnload.apply(this,arguments);
|
||
|
},_pushOnStack:function(_a5b,obj,func){
|
||
|
if(typeof func=="undefined"){
|
||
|
_a5b.push(obj);
|
||
|
}else{
|
||
|
_a5b.push(function(){
|
||
|
obj[func]();
|
||
|
});
|
||
|
}
|
||
|
},destroy:function(){
|
||
|
this.onUnload();
|
||
|
dojo.widget.ContentPane.superclass.destroy.call(this);
|
||
|
},onExecError:function(e){
|
||
|
},onContentError:function(e){
|
||
|
},onDownloadError:function(e){
|
||
|
},onDownloadStart:function(e){
|
||
|
},onDownloadEnd:function(url,data){
|
||
|
data=this.splitAndFixPaths(data,url);
|
||
|
this.setContent(data);
|
||
|
},_handleDefaults:function(e,_a65,_a66){
|
||
|
if(!_a65){
|
||
|
_a65="onContentError";
|
||
|
}
|
||
|
if(dojo.lang.isString(e)){
|
||
|
e={text:e};
|
||
|
}
|
||
|
if(!e.text){
|
||
|
e.text=e.toString();
|
||
|
}
|
||
|
e.toString=function(){
|
||
|
return this.text;
|
||
|
};
|
||
|
if(typeof e.returnValue!="boolean"){
|
||
|
e.returnValue=true;
|
||
|
}
|
||
|
if(typeof e.preventDefault!="function"){
|
||
|
e.preventDefault=function(){
|
||
|
this.returnValue=false;
|
||
|
};
|
||
|
}
|
||
|
this[_a65](e);
|
||
|
if(e.returnValue){
|
||
|
switch(_a66){
|
||
|
case true:
|
||
|
case "alert":
|
||
|
alert(e.toString());
|
||
|
break;
|
||
|
case "debug":
|
||
|
dojo.debug(e.toString());
|
||
|
break;
|
||
|
default:
|
||
|
if(this._callOnUnload){
|
||
|
this.onUnload();
|
||
|
}
|
||
|
this._callOnUnload=false;
|
||
|
if(arguments.callee._loopStop){
|
||
|
dojo.debug(e.toString());
|
||
|
}else{
|
||
|
arguments.callee._loopStop=true;
|
||
|
this._setContent(e.toString());
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
arguments.callee._loopStop=false;
|
||
|
},splitAndFixPaths:function(s,url){
|
||
|
var _a69=[],_a6a=[],tmp=[];
|
||
|
var _a6c=[],_a6d=[],attr=[],_a6f=[];
|
||
|
var str="",path="",fix="",_a73="",tag="",_a75="";
|
||
|
if(!url){
|
||
|
url="./";
|
||
|
}
|
||
|
if(s){
|
||
|
var _a76=/<title[^>]*>([\s\S]*?)<\/title>/i;
|
||
|
while(_a6c=_a76.exec(s)){
|
||
|
_a69.push(_a6c[1]);
|
||
|
s=s.substring(0,_a6c.index)+s.substr(_a6c.index+_a6c[0].length);
|
||
|
}
|
||
|
if(this.adjustPaths){
|
||
|
var _a77=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i;
|
||
|
var _a78=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i;
|
||
|
var _a79=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/;
|
||
|
while(tag=_a77.exec(s)){
|
||
|
str+=s.substring(0,tag.index);
|
||
|
s=s.substring((tag.index+tag[0].length),s.length);
|
||
|
tag=tag[0];
|
||
|
_a73="";
|
||
|
while(attr=_a78.exec(tag)){
|
||
|
path="";
|
||
|
_a75=attr[3];
|
||
|
switch(attr[1].toLowerCase()){
|
||
|
case "src":
|
||
|
case "href":
|
||
|
if(_a79.exec(_a75)){
|
||
|
path=_a75;
|
||
|
}else{
|
||
|
path=(new dojo.uri.Uri(url,_a75).toString());
|
||
|
}
|
||
|
break;
|
||
|
case "style":
|
||
|
path=dojo.html.fixPathsInCssText(_a75,url);
|
||
|
break;
|
||
|
default:
|
||
|
path=_a75;
|
||
|
}
|
||
|
fix=" "+attr[1]+"="+attr[2]+path+attr[2];
|
||
|
_a73+=tag.substring(0,attr.index)+fix;
|
||
|
tag=tag.substring((attr.index+attr[0].length),tag.length);
|
||
|
}
|
||
|
str+=_a73+tag;
|
||
|
}
|
||
|
s=str+s;
|
||
|
}
|
||
|
_a76=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|<link ([^>]*rel=['"]?stylesheet['"]?[^>]*)>)/i;
|
||
|
while(_a6c=_a76.exec(s)){
|
||
|
if(_a6c[1]&&_a6c[1].toLowerCase()=="style"){
|
||
|
_a6f.push(dojo.html.fixPathsInCssText(_a6c[2],url));
|
||
|
}else{
|
||
|
if(attr=_a6c[3].match(/href=(['"]?)([^'">]*)\1/i)){
|
||
|
_a6f.push({path:attr[2]});
|
||
|
}
|
||
|
}
|
||
|
s=s.substring(0,_a6c.index)+s.substr(_a6c.index+_a6c[0].length);
|
||
|
}
|
||
|
var _a76=/<script([^>]*)>([\s\S]*?)<\/script>/i;
|
||
|
var _a7a=/src=(['"]?)([^"']*)\1/i;
|
||
|
var _a7b=/.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/;
|
||
|
var _a7c=/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g;
|
||
|
var _a7d=/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix|registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/;
|
||
|
while(_a6c=_a76.exec(s)){
|
||
|
if(this.executeScripts&&_a6c[1]){
|
||
|
if(attr=_a7a.exec(_a6c[1])){
|
||
|
if(_a7b.exec(attr[2])){
|
||
|
dojo.debug("Security note! inhibit:"+attr[2]+" from being loaded again.");
|
||
|
}else{
|
||
|
_a6a.push({path:attr[2]});
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if(_a6c[2]){
|
||
|
var sc=_a6c[2].replace(_a7c,"");
|
||
|
if(!sc){
|
||
|
continue;
|
||
|
}
|
||
|
while(tmp=_a7d.exec(sc)){
|
||
|
_a6d.push(tmp[0]);
|
||
|
sc=sc.substring(0,tmp.index)+sc.substr(tmp.index+tmp[0].length);
|
||
|
}
|
||
|
if(this.executeScripts){
|
||
|
_a6a.push(sc);
|
||
|
}
|
||
|
}
|
||
|
s=s.substr(0,_a6c.index)+s.substr(_a6c.index+_a6c[0].length);
|
||
|
}
|
||
|
if(this.extractContent){
|
||
|
_a6c=s.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
|
||
|
if(_a6c){
|
||
|
s=_a6c[1];
|
||
|
}
|
||
|
}
|
||
|
if(this.executeScripts&&this.scriptSeparation){
|
||
|
var _a76=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/;
|
||
|
var _a7f=/([\s'";:\(])scriptScope(.*)/;
|
||
|
str="";
|
||
|
while(tag=_a76.exec(s)){
|
||
|
tmp=((tag[3]=="'")?"\"":"'");
|
||
|
fix="";
|
||
|
str+=s.substring(0,tag.index)+tag[1];
|
||
|
while(attr=_a7f.exec(tag[2])){
|
||
|
tag[2]=tag[2].substring(0,attr.index)+attr[1]+"dojo.widget.byId("+tmp+this.widgetId+tmp+").scriptScope"+attr[2];
|
||
|
}
|
||
|
str+=tag[2];
|
||
|
s=s.substr(tag.index+tag[0].length);
|
||
|
}
|
||
|
s=str+s;
|
||
|
}
|
||
|
}
|
||
|
return {"xml":s,"styles":_a6f,"titles":_a69,"requires":_a6d,"scripts":_a6a,"url":url};
|
||
|
},_setContent:function(cont){
|
||
|
this.destroyChildren();
|
||
|
for(var i=0;i<this._styleNodes.length;i++){
|
||
|
if(this._styleNodes[i]&&this._styleNodes[i].parentNode){
|
||
|
this._styleNodes[i].parentNode.removeChild(this._styleNodes[i]);
|
||
|
}
|
||
|
}
|
||
|
this._styleNodes=[];
|
||
|
try{
|
||
|
var node=this.containerNode||this.domNode;
|
||
|
while(node.firstChild){
|
||
|
dojo.html.destroyNode(node.firstChild);
|
||
|
}
|
||
|
if(typeof cont!="string"){
|
||
|
node.appendChild(cont);
|
||
|
}else{
|
||
|
node.innerHTML=cont;
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
e.text="Couldn't load content:"+e.description;
|
||
|
this._handleDefaults(e,"onContentError");
|
||
|
}
|
||
|
},setContent:function(data){
|
||
|
this.abort();
|
||
|
if(this._callOnUnload){
|
||
|
this.onUnload();
|
||
|
}
|
||
|
this._callOnUnload=true;
|
||
|
if(!data||dojo.html.isNode(data)){
|
||
|
this._setContent(data);
|
||
|
this.onResized();
|
||
|
this.onLoad();
|
||
|
}else{
|
||
|
if(typeof data.xml!="string"){
|
||
|
this.href="";
|
||
|
data=this.splitAndFixPaths(data);
|
||
|
}
|
||
|
this._setContent(data.xml);
|
||
|
for(var i=0;i<data.styles.length;i++){
|
||
|
if(data.styles[i].path){
|
||
|
this._styleNodes.push(dojo.html.insertCssFile(data.styles[i].path,dojo.doc(),false,true));
|
||
|
}else{
|
||
|
this._styleNodes.push(dojo.html.insertCssText(data.styles[i]));
|
||
|
}
|
||
|
}
|
||
|
if(this.parseContent){
|
||
|
for(var i=0;i<data.requires.length;i++){
|
||
|
try{
|
||
|
eval(data.requires[i]);
|
||
|
}
|
||
|
catch(e){
|
||
|
e.text="ContentPane: error in package loading calls, "+(e.description||e);
|
||
|
this._handleDefaults(e,"onContentError","debug");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
var _a85=this;
|
||
|
function asyncParse(){
|
||
|
if(_a85.executeScripts){
|
||
|
_a85._executeScripts(data.scripts);
|
||
|
}
|
||
|
if(_a85.parseContent){
|
||
|
var node=_a85.containerNode||_a85.domNode;
|
||
|
var _a87=new dojo.xml.Parse();
|
||
|
var frag=_a87.parseElement(node,null,true);
|
||
|
dojo.widget.getParser().createSubComponents(frag,_a85);
|
||
|
}
|
||
|
_a85.onResized();
|
||
|
_a85.onLoad();
|
||
|
}
|
||
|
if(dojo.hostenv.isXDomain&&data.requires.length){
|
||
|
dojo.addOnLoad(asyncParse);
|
||
|
}else{
|
||
|
asyncParse();
|
||
|
}
|
||
|
}
|
||
|
},setHandler:function(_a89){
|
||
|
var fcn=dojo.lang.isFunction(_a89)?_a89:window[_a89];
|
||
|
if(!dojo.lang.isFunction(fcn)){
|
||
|
this._handleDefaults("Unable to set handler, '"+_a89+"' not a function.","onExecError",true);
|
||
|
return;
|
||
|
}
|
||
|
this.handler=function(){
|
||
|
return fcn.apply(this,arguments);
|
||
|
};
|
||
|
},_runHandler:function(){
|
||
|
var ret=true;
|
||
|
if(dojo.lang.isFunction(this.handler)){
|
||
|
this.handler(this,this.domNode);
|
||
|
ret=false;
|
||
|
}
|
||
|
this.onLoad();
|
||
|
return ret;
|
||
|
},_executeScripts:function(_a8c){
|
||
|
var self=this;
|
||
|
var tmp="",code="";
|
||
|
for(var i=0;i<_a8c.length;i++){
|
||
|
if(_a8c[i].path){
|
||
|
dojo.io.bind(this._cacheSetting({"url":_a8c[i].path,"load":function(type,_a92){
|
||
|
dojo.lang.hitch(self,tmp=";"+_a92);
|
||
|
},"error":function(type,_a94){
|
||
|
_a94.text=type+" downloading remote script";
|
||
|
self._handleDefaults.call(self,_a94,"onExecError","debug");
|
||
|
},"mimetype":"text/plain","sync":true},this.cacheContent));
|
||
|
code+=tmp;
|
||
|
}else{
|
||
|
code+=_a8c[i];
|
||
|
}
|
||
|
}
|
||
|
try{
|
||
|
if(this.scriptSeparation){
|
||
|
delete this.scriptScope;
|
||
|
this.scriptScope=new (new Function("_container_",code+"; return this;"))(self);
|
||
|
}else{
|
||
|
var djg=dojo.global();
|
||
|
if(djg.execScript){
|
||
|
djg.execScript(code);
|
||
|
}else{
|
||
|
var djd=dojo.doc();
|
||
|
var sc=djd.createElement("script");
|
||
|
sc.appendChild(djd.createTextNode(code));
|
||
|
(this.containerNode||this.domNode).appendChild(sc);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
e.text="Error running scripts from content:\n"+e.description;
|
||
|
this._handleDefaults(e,"onExecError","debug");
|
||
|
}
|
||
|
}});
|
||
|
dojo.provide("dojo.widget.PopupContainer");
|
||
|
dojo.declare("dojo.widget.PopupContainerBase",null,function(){
|
||
|
this.queueOnAnimationFinish=[];
|
||
|
},{isShowingNow:false,currentSubpopup:null,beginZIndex:1000,parentPopup:null,parent:null,popupIndex:0,aroundBox:dojo.html.boxSizing.BORDER_BOX,openedForWindow:null,processKey:function(evt){
|
||
|
return false;
|
||
|
},applyPopupBasicStyle:function(){
|
||
|
with(this.domNode.style){
|
||
|
display="none";
|
||
|
position="absolute";
|
||
|
}
|
||
|
},aboutToShow:function(){
|
||
|
},open:function(x,y,_a9b,_a9c,_a9d,_a9e){
|
||
|
if(this.isShowingNow){
|
||
|
return;
|
||
|
}
|
||
|
if(this.animationInProgress){
|
||
|
this.queueOnAnimationFinish.push(this.open,arguments);
|
||
|
return;
|
||
|
}
|
||
|
this.aboutToShow();
|
||
|
var _a9f=false,node,_aa1;
|
||
|
if(typeof x=="object"){
|
||
|
node=x;
|
||
|
_aa1=_a9c;
|
||
|
_a9c=_a9b;
|
||
|
_a9b=y;
|
||
|
_a9f=true;
|
||
|
}
|
||
|
this.parent=_a9b;
|
||
|
dojo.body().appendChild(this.domNode);
|
||
|
_a9c=_a9c||_a9b["domNode"]||[];
|
||
|
var _aa2=null;
|
||
|
this.isTopLevel=true;
|
||
|
while(_a9b){
|
||
|
if(_a9b!==this&&(_a9b.setOpenedSubpopup!=undefined&&_a9b.applyPopupBasicStyle!=undefined)){
|
||
|
_aa2=_a9b;
|
||
|
this.isTopLevel=false;
|
||
|
_aa2.setOpenedSubpopup(this);
|
||
|
break;
|
||
|
}
|
||
|
_a9b=_a9b.parent;
|
||
|
}
|
||
|
this.parentPopup=_aa2;
|
||
|
this.popupIndex=_aa2?_aa2.popupIndex+1:1;
|
||
|
if(this.isTopLevel){
|
||
|
var _aa3=dojo.html.isNode(_a9c)?_a9c:null;
|
||
|
dojo.widget.PopupManager.opened(this,_aa3);
|
||
|
}
|
||
|
if(this.isTopLevel&&!dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){
|
||
|
this._bookmark=dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.getBookmark);
|
||
|
}else{
|
||
|
this._bookmark=null;
|
||
|
}
|
||
|
if(_a9c instanceof Array){
|
||
|
_a9c={left:_a9c[0],top:_a9c[1],width:0,height:0};
|
||
|
}
|
||
|
with(this.domNode.style){
|
||
|
display="";
|
||
|
zIndex=this.beginZIndex+this.popupIndex;
|
||
|
}
|
||
|
if(_a9f){
|
||
|
this.move(node,_a9e,_aa1);
|
||
|
}else{
|
||
|
this.move(x,y,_a9e,_a9d);
|
||
|
}
|
||
|
this.domNode.style.display="none";
|
||
|
this.explodeSrc=_a9c;
|
||
|
this.show();
|
||
|
this.isShowingNow=true;
|
||
|
},move:function(x,y,_aa6,_aa7){
|
||
|
var _aa8=(typeof x=="object");
|
||
|
if(_aa8){
|
||
|
var _aa9=_aa6;
|
||
|
var node=x;
|
||
|
_aa6=y;
|
||
|
if(!_aa9){
|
||
|
_aa9={"BL":"TL","TL":"BL"};
|
||
|
}
|
||
|
dojo.html.placeOnScreenAroundElement(this.domNode,node,_aa6,this.aroundBox,_aa9);
|
||
|
}else{
|
||
|
if(!_aa7){
|
||
|
_aa7="TL,TR,BL,BR";
|
||
|
}
|
||
|
dojo.html.placeOnScreen(this.domNode,x,y,_aa6,true,_aa7);
|
||
|
}
|
||
|
},close:function(_aab){
|
||
|
if(_aab){
|
||
|
this.domNode.style.display="none";
|
||
|
}
|
||
|
if(this.animationInProgress){
|
||
|
this.queueOnAnimationFinish.push(this.close,[]);
|
||
|
return;
|
||
|
}
|
||
|
this.closeSubpopup(_aab);
|
||
|
this.hide();
|
||
|
if(this.bgIframe){
|
||
|
this.bgIframe.hide();
|
||
|
this.bgIframe.size({left:0,top:0,width:0,height:0});
|
||
|
}
|
||
|
if(this.isTopLevel){
|
||
|
dojo.widget.PopupManager.closed(this);
|
||
|
}
|
||
|
this.isShowingNow=false;
|
||
|
if(this.parent){
|
||
|
setTimeout(dojo.lang.hitch(this,function(){
|
||
|
try{
|
||
|
if(this.parent["focus"]){
|
||
|
this.parent.focus();
|
||
|
}else{
|
||
|
this.parent.domNode.focus();
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
dojo.debug("No idea how to focus to parent",e);
|
||
|
}
|
||
|
}),10);
|
||
|
}
|
||
|
if(this._bookmark&&dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){
|
||
|
if(this.openedForWindow){
|
||
|
this.openedForWindow.focus();
|
||
|
}
|
||
|
try{
|
||
|
dojo.withGlobal(this.openedForWindow||dojo.global(),"moveToBookmark",dojo.html.selection,[this._bookmark]);
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
}
|
||
|
this._bookmark=null;
|
||
|
},closeAll:function(_aac){
|
||
|
if(this.parentPopup){
|
||
|
this.parentPopup.closeAll(_aac);
|
||
|
}else{
|
||
|
this.close(_aac);
|
||
|
}
|
||
|
},setOpenedSubpopup:function(_aad){
|
||
|
this.currentSubpopup=_aad;
|
||
|
},closeSubpopup:function(_aae){
|
||
|
if(this.currentSubpopup==null){
|
||
|
return;
|
||
|
}
|
||
|
this.currentSubpopup.close(_aae);
|
||
|
this.currentSubpopup=null;
|
||
|
},onShow:function(){
|
||
|
dojo.widget.PopupContainer.superclass.onShow.apply(this,arguments);
|
||
|
this.openedSize={w:this.domNode.style.width,h:this.domNode.style.height};
|
||
|
if(dojo.render.html.ie){
|
||
|
if(!this.bgIframe){
|
||
|
this.bgIframe=new dojo.html.BackgroundIframe();
|
||
|
this.bgIframe.setZIndex(this.domNode);
|
||
|
}
|
||
|
this.bgIframe.size(this.domNode);
|
||
|
this.bgIframe.show();
|
||
|
}
|
||
|
this.processQueue();
|
||
|
},processQueue:function(){
|
||
|
if(!this.queueOnAnimationFinish.length){
|
||
|
return;
|
||
|
}
|
||
|
var func=this.queueOnAnimationFinish.shift();
|
||
|
var args=this.queueOnAnimationFinish.shift();
|
||
|
func.apply(this,args);
|
||
|
},onHide:function(){
|
||
|
dojo.widget.HtmlWidget.prototype.onHide.call(this);
|
||
|
if(this.openedSize){
|
||
|
with(this.domNode.style){
|
||
|
width=this.openedSize.w;
|
||
|
height=this.openedSize.h;
|
||
|
}
|
||
|
}
|
||
|
this.processQueue();
|
||
|
}});
|
||
|
dojo.widget.defineWidget("dojo.widget.PopupContainer",[dojo.widget.HtmlWidget,dojo.widget.PopupContainerBase],{isContainer:true,fillInTemplate:function(){
|
||
|
this.applyPopupBasicStyle();
|
||
|
dojo.widget.PopupContainer.superclass.fillInTemplate.apply(this,arguments);
|
||
|
}});
|
||
|
dojo.widget.PopupManager=new function(){
|
||
|
this.currentMenu=null;
|
||
|
this.currentButton=null;
|
||
|
this.currentFocusMenu=null;
|
||
|
this.focusNode=null;
|
||
|
this.registeredWindows=[];
|
||
|
this.registerWin=function(win){
|
||
|
if(!win.__PopupManagerRegistered){
|
||
|
dojo.event.connect(win.document,"onmousedown",this,"onClick");
|
||
|
dojo.event.connect(win,"onscroll",this,"onClick");
|
||
|
dojo.event.connect(win.document,"onkey",this,"onKey");
|
||
|
win.__PopupManagerRegistered=true;
|
||
|
this.registeredWindows.push(win);
|
||
|
}
|
||
|
};
|
||
|
this.registerAllWindows=function(_ab2){
|
||
|
if(!_ab2){
|
||
|
_ab2=dojo.html.getDocumentWindow(window.top&&window.top.document||window.document);
|
||
|
}
|
||
|
this.registerWin(_ab2);
|
||
|
for(var i=0;i<_ab2.frames.length;i++){
|
||
|
try{
|
||
|
var win=dojo.html.getDocumentWindow(_ab2.frames[i].document);
|
||
|
if(win){
|
||
|
this.registerAllWindows(win);
|
||
|
}
|
||
|
}
|
||
|
catch(e){
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
this.unRegisterWin=function(win){
|
||
|
if(win.__PopupManagerRegistered){
|
||
|
dojo.event.disconnect(win.document,"onmousedown",this,"onClick");
|
||
|
dojo.event.disconnect(win,"onscroll",this,"onClick");
|
||
|
dojo.event.disconnect(win.document,"onkey",this,"onKey");
|
||
|
win.__PopupManagerRegistered=false;
|
||
|
}
|
||
|
};
|
||
|
this.unRegisterAllWindows=function(){
|
||
|
for(var i=0;i<this.registeredWindows.length;++i){
|
||
|
this.unRegisterWin(this.registeredWindows[i]);
|
||
|
}
|
||
|
this.registeredWindows=[];
|
||
|
};
|
||
|
dojo.addOnLoad(this,"registerAllWindows");
|
||
|
dojo.addOnUnload(this,"unRegisterAllWindows");
|
||
|
this.closed=function(menu){
|
||
|
if(this.currentMenu==menu){
|
||
|
this.currentMenu=null;
|
||
|
this.currentButton=null;
|
||
|
this.currentFocusMenu=null;
|
||
|
}
|
||
|
};
|
||
|
this.opened=function(menu,_ab9){
|
||
|
if(menu==this.currentMenu){
|
||
|
return;
|
||
|
}
|
||
|
if(this.currentMenu){
|
||
|
this.currentMenu.close();
|
||
|
}
|
||
|
this.currentMenu=menu;
|
||
|
this.currentFocusMenu=menu;
|
||
|
this.currentButton=_ab9;
|
||
|
};
|
||
|
this.setFocusedMenu=function(menu){
|
||
|
this.currentFocusMenu=menu;
|
||
|
};
|
||
|
this.onKey=function(e){
|
||
|
if(!e.key){
|
||
|
return;
|
||
|
}
|
||
|
if(!this.currentMenu||!this.currentMenu.isShowingNow){
|
||
|
return;
|
||
|
}
|
||
|
var m=this.currentFocusMenu;
|
||
|
while(m){
|
||
|
if(m.processKey(e)){
|
||
|
e.preventDefault();
|
||
|
e.stopPropagation();
|
||
|
break;
|
||
|
}
|
||
|
m=m.parentPopup||m.parentMenu;
|
||
|
}
|
||
|
},this.onClick=function(e){
|
||
|
if(!this.currentMenu){
|
||
|
return;
|
||
|
}
|
||
|
var _abe=dojo.html.getScroll().offset;
|
||
|
var m=this.currentMenu;
|
||
|
while(m){
|
||
|
if(dojo.html.overElement(m.domNode,e)||dojo.html.isDescendantOf(e.target,m.domNode)){
|
||
|
return;
|
||
|
}
|
||
|
m=m.currentSubpopup;
|
||
|
}
|
||
|
if(this.currentButton&&dojo.html.overElement(this.currentButton,e)){
|
||
|
return;
|
||
|
}
|
||
|
this.currentMenu.closeAll(true);
|
||
|
};
|
||
|
};
|
||
|
dojo.provide("dojo.widget.Tooltip");
|
||
|
dojo.widget.defineWidget("dojo.widget.Tooltip",[dojo.widget.ContentPane,dojo.widget.PopupContainerBase],{caption:"",showDelay:500,hideDelay:100,connectId:"",templateCssString:".dojoTooltip {\r\n\tborder: solid black 1px;\r\n\tbackground: beige;\r\n\tcolor: black;\r\n\tposition: absolute;\r\n\tfont-size: small;\r\n\tpadding: 2px 2px 2px 2px;\r\n\tz-index: 10;\r\n\tdisplay: block;\r\n}\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/TooltipTemplate.css"),fillInTemplate:function(args,frag){
|
||
|
if(this.caption!=""){
|
||
|
this.domNode.appendChild(document.createTextNode(this.caption));
|
||
|
}
|
||
|
this._connectNode=dojo.byId(this.connectId);
|
||
|
dojo.widget.Tooltip.superclass.fillInTemplate.call(this,args,frag);
|
||
|
this.addOnLoad(this,"_loadedContent");
|
||
|
dojo.html.addClass(this.domNode,"dojoTooltip");
|
||
|
var _ac2=this.getFragNodeRef(frag);
|
||
|
dojo.html.copyStyle(this.domNode,_ac2);
|
||
|
this.applyPopupBasicStyle();
|
||
|
},postCreate:function(args,frag){
|
||
|
dojo.event.connect(this._connectNode,"onmouseover",this,"_onMouseOver");
|
||
|
dojo.widget.Tooltip.superclass.postCreate.call(this,args,frag);
|
||
|
},_onMouseOver:function(e){
|
||
|
this._mouse={x:e.pageX,y:e.pageY};
|
||
|
if(!this._tracking){
|
||
|
dojo.event.connect(document.documentElement,"onmousemove",this,"_onMouseMove");
|
||
|
this._tracking=true;
|
||
|
}
|
||
|
this._onHover(e);
|
||
|
},_onMouseMove:function(e){
|
||
|
this._mouse={x:e.pageX,y:e.pageY};
|
||
|
if(dojo.html.overElement(this._connectNode,e)||dojo.html.overElement(this.domNode,e)){
|
||
|
this._onHover(e);
|
||
|
}else{
|
||
|
this._onUnHover(e);
|
||
|
}
|
||
|
},_onHover:function(e){
|
||
|
if(this._hover){
|
||
|
return;
|
||
|
}
|
||
|
this._hover=true;
|
||
|
if(this._hideTimer){
|
||
|
clearTimeout(this._hideTimer);
|
||
|
delete this._hideTimer;
|
||
|
}
|
||
|
if(!this.isShowingNow&&!this._showTimer){
|
||
|
this._showTimer=setTimeout(dojo.lang.hitch(this,"open"),this.showDelay);
|
||
|
}
|
||
|
},_onUnHover:function(e){
|
||
|
if(!this._hover){
|
||
|
return;
|
||
|
}
|
||
|
this._hover=false;
|
||
|
if(this._showTimer){
|
||
|
clearTimeout(this._showTimer);
|
||
|
delete this._showTimer;
|
||
|
}
|
||
|
if(this.isShowingNow&&!this._hideTimer){
|
||
|
this._hideTimer=setTimeout(dojo.lang.hitch(this,"close"),this.hideDelay);
|
||
|
}
|
||
|
if(!this.isShowingNow){
|
||
|
dojo.event.disconnect(document.documentElement,"onmousemove",this,"_onMouseMove");
|
||
|
this._tracking=false;
|
||
|
}
|
||
|
},open:function(){
|
||
|
if(this.isShowingNow){
|
||
|
return;
|
||
|
}
|
||
|
dojo.widget.PopupContainerBase.prototype.open.call(this,this._mouse.x,this._mouse.y,null,[this._mouse.x,this._mouse.y],"TL,TR,BL,BR",[10,15]);
|
||
|
},close:function(){
|
||
|
if(this.isShowingNow){
|
||
|
if(this._showTimer){
|
||
|
clearTimeout(this._showTimer);
|
||
|
delete this._showTimer;
|
||
|
}
|
||
|
if(this._hideTimer){
|
||
|
clearTimeout(this._hideTimer);
|
||
|
delete this._hideTimer;
|
||
|
}
|
||
|
dojo.event.disconnect(document.documentElement,"onmousemove",this,"_onMouseMove");
|
||
|
this._tracking=false;
|
||
|
dojo.widget.PopupContainerBase.prototype.close.call(this);
|
||
|
}
|
||
|
},_position:function(){
|
||
|
this.move(this._mouse.x,this._mouse.y,[10,15],"TL,TR,BL,BR");
|
||
|
},_loadedContent:function(){
|
||
|
if(this.isShowingNow){
|
||
|
this._position();
|
||
|
}
|
||
|
},checkSize:function(){
|
||
|
},uninitialize:function(){
|
||
|
this.close();
|
||
|
dojo.event.disconnect(this._connectNode,"onmouseover",this,"_onMouseOver");
|
||
|
}});
|
||
|
dojo.provide("dojo.widget.DropdownContainer");
|
||
|
dojo.widget.defineWidget("dojo.widget.DropdownContainer",dojo.widget.HtmlWidget,{inputWidth:"7em",id:"",inputId:"",inputName:"",iconURL:dojo.uri.moduleUri("dojo.widget","templates/images/combo_box_arrow.png"),copyClasses:false,iconAlt:"",containerToggle:"plain",containerToggleDuration:150,templateString:"<span style=\"white-space:nowrap\"><input type=\"hidden\" name=\"\" value=\"\" dojoAttachPoint=\"valueNode\" /><input name=\"\" type=\"text\" value=\"\" style=\"vertical-align:middle;\" dojoAttachPoint=\"inputNode\" autocomplete=\"off\" /> <img src=\"${this.iconURL}\" alt=\"${this.iconAlt}\" dojoAttachEvent=\"onclick:onIconClick\" dojoAttachPoint=\"buttonNode\" style=\"vertical-align:middle; cursor:pointer; cursor:hand\" /></span>",templateCssPath:"",isContainer:true,attachTemplateNodes:function(){
|
||
|
dojo.widget.DropdownContainer.superclass.attachTemplateNodes.apply(this,arguments);
|
||
|
this.popup=dojo.widget.createWidget("PopupContainer",{toggle:this.containerToggle,toggleDuration:this.containerToggleDuration});
|
||
|
this.containerNode=this.popup.domNode;
|
||
|
},fillInTemplate:function(args,frag){
|
||
|
this.domNode.appendChild(this.popup.domNode);
|
||
|
if(this.id){
|
||
|
this.domNode.id=this.id;
|
||
|
}
|
||
|
if(this.inputId){
|
||
|
this.inputNode.id=this.inputId;
|
||
|
}
|
||
|
if(this.inputName){
|
||
|
this.inputNode.name=this.inputName;
|
||
|
}
|
||
|
this.inputNode.style.width=this.inputWidth;
|
||
|
this.inputNode.disabled=this.disabled;
|
||
|
if(this.copyClasses){
|
||
|
this.inputNode.style="";
|
||
|
this.inputNode.className=this.getFragNodeRef(frag).className;
|
||
|
}
|
||
|
dojo.event.connect(this.inputNode,"onchange",this,"onInputChange");
|
||
|
},onIconClick:function(evt){
|
||
|
if(this.disabled){
|
||
|
return;
|
||
|
}
|
||
|
if(!this.popup.isShowingNow){
|
||
|
this.popup.open(this.inputNode,this,this.buttonNode);
|
||
|
}else{
|
||
|
this.popup.close();
|
||
|
}
|
||
|
},hideContainer:function(){
|
||
|
if(this.popup.isShowingNow){
|
||
|
this.popup.close();
|
||
|
}
|
||
|
},onInputChange:function(){
|
||
|
},enable:function(){
|
||
|
this.inputNode.disabled=false;
|
||
|
dojo.widget.DropdownContainer.superclass.enable.apply(this,arguments);
|
||
|
},disable:function(){
|
||
|
this.inputNode.disabled=true;
|
||
|
dojo.widget.DropdownContainer.superclass.disable.apply(this,arguments);
|
||
|
}});
|
||
|
dojo.provide("dojo.date.common");
|
||
|
dojo.date.setDayOfYear=function(_acc,_acd){
|
||
|
_acc.setMonth(0);
|
||
|
_acc.setDate(_acd);
|
||
|
return _acc;
|
||
|
};
|
||
|
dojo.date.getDayOfYear=function(_ace){
|
||
|
var _acf=_ace.getFullYear();
|
||
|
var _ad0=new Date(_acf-1,11,31);
|
||
|
return Math.floor((_ace.getTime()-_ad0.getTime())/86400000);
|
||
|
};
|
||
|
dojo.date.setWeekOfYear=function(_ad1,week,_ad3){
|
||
|
if(arguments.length==1){
|
||
|
_ad3=0;
|
||
|
}
|
||
|
dojo.unimplemented("dojo.date.setWeekOfYear");
|
||
|
};
|
||
|
dojo.date.getWeekOfYear=function(_ad4,_ad5){
|
||
|
if(arguments.length==1){
|
||
|
_ad5=0;
|
||
|
}
|
||
|
var _ad6=new Date(_ad4.getFullYear(),0,1);
|
||
|
var day=_ad6.getDay();
|
||
|
_ad6.setDate(_ad6.getDate()-day+_ad5-(day>_ad5?7:0));
|
||
|
return Math.floor((_ad4.getTime()-_ad6.getTime())/604800000);
|
||
|
};
|
||
|
dojo.date.setIsoWeekOfYear=function(_ad8,week,_ada){
|
||
|
if(arguments.length==1){
|
||
|
_ada=1;
|
||
|
}
|
||
|
dojo.unimplemented("dojo.date.setIsoWeekOfYear");
|
||
|
};
|
||
|
dojo.date.getIsoWeekOfYear=function(_adb,_adc){
|
||
|
if(arguments.length==1){
|
||
|
_adc=1;
|
||
|
}
|
||
|
dojo.unimplemented("dojo.date.getIsoWeekOfYear");
|
||
|
};
|
||
|
dojo.date.shortTimezones=["IDLW","BET","HST","MART","AKST","PST","MST","CST","EST","AST","NFT","BST","FST","AT","GMT","CET","EET","MSK","IRT","GST","AFT","AGTT","IST","NPT","ALMT","MMT","JT","AWST","JST","ACST","AEST","LHST","VUT","NFT","NZT","CHAST","PHOT","LINT"];
|
||
|
dojo.date.timezoneOffsets=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,540,570,600,630,660,690,720,765,780,840];
|
||
|
dojo.date.getDaysInMonth=function(_add){
|
||
|
var _ade=_add.getMonth();
|
||
|
var days=[31,28,31,30,31,30,31,31,30,31,30,31];
|
||
|
if(_ade==1&&dojo.date.isLeapYear(_add)){
|
||
|
return 29;
|
||
|
}else{
|
||
|
return days[_ade];
|
||
|
}
|
||
|
};
|
||
|
dojo.date.isLeapYear=function(_ae0){
|
||
|
var year=_ae0.getFullYear();
|
||
|
return (year%400==0)?true:(year%100==0)?false:(year%4==0)?true:false;
|
||
|
};
|
||
|
dojo.date.getTimezoneName=function(_ae2){
|
||
|
var str=_ae2.toString();
|
||
|
var tz="";
|
||
|
var _ae5;
|
||
|
var pos=str.indexOf("(");
|
||
|
if(pos>-1){
|
||
|
pos++;
|
||
|
tz=str.substring(pos,str.indexOf(")"));
|
||
|
}else{
|
||
|
var pat=/([A-Z\/]+) \d{4}$/;
|
||
|
if((_ae5=str.match(pat))){
|
||
|
tz=_ae5[1];
|
||
|
}else{
|
||
|
str=_ae2.toLocaleString();
|
||
|
pat=/ ([A-Z\/]+)$/;
|
||
|
if((_ae5=str.match(pat))){
|
||
|
tz=_ae5[1];
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return tz=="AM"||tz=="PM"?"":tz;
|
||
|
};
|
||
|
dojo.date.getOrdinal=function(_ae8){
|
||
|
var date=_ae8.getDate();
|
||
|
if(date%100!=11&&date%10==1){
|
||
|
return "st";
|
||
|
}else{
|
||
|
if(date%100!=12&&date%10==2){
|
||
|
return "nd";
|
||
|
}else{
|
||
|
if(date%100!=13&&date%10==3){
|
||
|
return "rd";
|
||
|
}else{
|
||
|
return "th";
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
dojo.date.compareTypes={DATE:1,TIME:2};
|
||
|
dojo.date.compare=function(_aea,_aeb,_aec){
|
||
|
var dA=_aea;
|
||
|
var dB=_aeb||new Date();
|
||
|
var now=new Date();
|
||
|
with(dojo.date.compareTypes){
|
||
|
var opt=_aec||(DATE|TIME);
|
||
|
var d1=new Date((opt&DATE)?dA.getFullYear():now.getFullYear(),(opt&DATE)?dA.getMonth():now.getMonth(),(opt&DATE)?dA.getDate():now.getDate(),(opt&TIME)?dA.getHours():0,(opt&TIME)?dA.getMinutes():0,(opt&TIME)?dA.getSeconds():0);
|
||
|
var d2=new Date((opt&DATE)?dB.getFullYear():now.getFullYear(),(opt&DATE)?dB.getMonth():now.getMonth(),(opt&DATE)?dB.getDate():now.getDate(),(opt&TIME)?dB.getHours():0,(opt&TIME)?dB.getMinutes():0,(opt&TIME)?dB.getSeconds():0);
|
||
|
}
|
||
|
if(d1.valueOf()>d2.valueOf()){
|
||
|
return 1;
|
||
|
}
|
||
|
if(d1.valueOf()<d2.valueOf()){
|
||
|
return -1;
|
||
|
}
|
||
|
return 0;
|
||
|
};
|
||
|
dojo.date.dateParts={YEAR:0,MONTH:1,DAY:2,HOUR:3,MINUTE:4,SECOND:5,MILLISECOND:6,QUARTER:7,WEEK:8,WEEKDAY:9};
|
||
|
dojo.date.add=function(dt,_af4,incr){
|
||
|
if(typeof dt=="number"){
|
||
|
dt=new Date(dt);
|
||
|
}
|
||
|
function fixOvershoot(){
|
||
|
if(sum.getDate()<dt.getDate()){
|
||
|
sum.setDate(0);
|
||
|
}
|
||
|
}
|
||
|
var sum=new Date(dt);
|
||
|
with(dojo.date.dateParts){
|
||
|
switch(_af4){
|
||
|
case YEAR:
|
||
|
sum.setFullYear(dt.getFullYear()+incr);
|
||
|
fixOvershoot();
|
||
|
break;
|
||
|
case QUARTER:
|
||
|
incr*=3;
|
||
|
case MONTH:
|
||
|
sum.setMonth(dt.getMonth()+incr);
|
||
|
fixOvershoot();
|
||
|
break;
|
||
|
case WEEK:
|
||
|
incr*=7;
|
||
|
case DAY:
|
||
|
sum.setDate(dt.getDate()+incr);
|
||
|
break;
|
||
|
case WEEKDAY:
|
||
|
var dat=dt.getDate();
|
||
|
var _af8=0;
|
||
|
var days=0;
|
||
|
var strt=0;
|
||
|
var trgt=0;
|
||
|
var adj=0;
|
||
|
var mod=incr%5;
|
||
|
if(mod==0){
|
||
|
days=(incr>0)?5:-5;
|
||
|
_af8=(incr>0)?((incr-5)/5):((incr+5)/5);
|
||
|
}else{
|
||
|
days=mod;
|
||
|
_af8=parseInt(incr/5);
|
||
|
}
|
||
|
strt=dt.getDay();
|
||
|
if(strt==6&&incr>0){
|
||
|
adj=1;
|
||
|
}else{
|
||
|
if(strt==0&&incr<0){
|
||
|
adj=-1;
|
||
|
}
|
||
|
}
|
||
|
trgt=(strt+days);
|
||
|
if(trgt==0||trgt==6){
|
||
|
adj=(incr>0)?2:-2;
|
||
|
}
|
||
|
sum.setDate(dat+(7*_af8)+days+adj);
|
||
|
break;
|
||
|
case HOUR:
|
||
|
sum.setHours(sum.getHours()+incr);
|
||
|
break;
|
||
|
case MINUTE:
|
||
|
sum.setMinutes(sum.getMinutes()+incr);
|
||
|
break;
|
||
|
case SECOND:
|
||
|
sum.setSeconds(sum.getSeconds()+incr);
|
||
|
break;
|
||
|
case MILLISECOND:
|
||
|
sum.setMilliseconds(sum.getMilliseconds()+incr);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
return sum;
|
||
|
};
|
||
|
dojo.date.diff=function(dtA,dtB,_b00){
|
||
|
if(typeof dtA=="number"){
|
||
|
dtA=new Date(dtA);
|
||
|
}
|
||
|
if(typeof dtB=="number"){
|
||
|
dtB=new Date(dtB);
|
||
|
}
|
||
|
var _b01=dtB.getFullYear()-dtA.getFullYear();
|
||
|
var _b02=(dtB.getMonth()-dtA.getMonth())+(_b01*12);
|
||
|
var _b03=dtB.getTime()-dtA.getTime();
|
||
|
var _b04=_b03/1000;
|
||
|
var _b05=_b04/60;
|
||
|
var _b06=_b05/60;
|
||
|
var _b07=_b06/24;
|
||
|
var _b08=_b07/7;
|
||
|
var _b09=0;
|
||
|
with(dojo.date.dateParts){
|
||
|
switch(_b00){
|
||
|
case YEAR:
|
||
|
_b09=_b01;
|
||
|
break;
|
||
|
case QUARTER:
|
||
|
var mA=dtA.getMonth();
|
||
|
var mB=dtB.getMonth();
|
||
|
var qA=Math.floor(mA/3)+1;
|
||
|
var qB=Math.floor(mB/3)+1;
|
||
|
qB+=(_b01*4);
|
||
|
_b09=qB-qA;
|
||
|
break;
|
||
|
case MONTH:
|
||
|
_b09=_b02;
|
||
|
break;
|
||
|
case WEEK:
|
||
|
_b09=parseInt(_b08);
|
||
|
break;
|
||
|
case DAY:
|
||
|
_b09=_b07;
|
||
|
break;
|
||
|
case WEEKDAY:
|
||
|
var days=Math.round(_b07);
|
||
|
var _b0f=parseInt(days/7);
|
||
|
var mod=days%7;
|
||
|
if(mod==0){
|
||
|
days=_b0f*5;
|
||
|
}else{
|
||
|
var adj=0;
|
||
|
var aDay=dtA.getDay();
|
||
|
var bDay=dtB.getDay();
|
||
|
_b0f=parseInt(days/7);
|
||
|
mod=days%7;
|
||
|
var _b14=new Date(dtA);
|
||
|
_b14.setDate(_b14.getDate()+(_b0f*7));
|
||
|
var _b15=_b14.getDay();
|
||
|
if(_b07>0){
|
||
|
switch(true){
|
||
|
case aDay==6:
|
||
|
adj=-1;
|
||
|
break;
|
||
|
case aDay==0:
|
||
|
adj=0;
|
||
|
break;
|
||
|
case bDay==6:
|
||
|
adj=-1;
|
||
|
break;
|
||
|
case bDay==0:
|
||
|
adj=-2;
|
||
|
break;
|
||
|
case (_b15+mod)>5:
|
||
|
adj=-2;
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}else{
|
||
|
if(_b07<0){
|
||
|
switch(true){
|
||
|
case aDay==6:
|
||
|
adj=0;
|
||
|
break;
|
||
|
case aDay==0:
|
||
|
adj=1;
|
||
|
break;
|
||
|
case bDay==6:
|
||
|
adj=2;
|
||
|
break;
|
||
|
case bDay==0:
|
||
|
adj=1;
|
||
|
break;
|
||
|
case (_b15+mod)<0:
|
||
|
adj=2;
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
days+=adj;
|
||
|
days-=(_b0f*2);
|
||
|
}
|
||
|
_b09=days;
|
||
|
break;
|
||
|
case HOUR:
|
||
|
_b09=_b06;
|
||
|
break;
|
||
|
case MINUTE:
|
||
|
_b09=_b05;
|
||
|
break;
|
||
|
case SECOND:
|
||
|
_b09=_b04;
|
||
|
break;
|
||
|
case MILLISECOND:
|
||
|
_b09=_b03;
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
return Math.round(_b09);
|
||
|
};
|
||
|
dojo.provide("dojo.date.supplemental");
|
||
|
dojo.date.getFirstDayOfWeek=function(_b16){
|
||
|
var _b17={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,gb:0,sy:4};
|
||
|
_b16=dojo.hostenv.normalizeLocale(_b16);
|
||
|
var _b18=_b16.split("-")[1];
|
||
|
var dow=_b17[_b18];
|
||
|
return (typeof dow=="undefined")?1:dow;
|
||
|
};
|
||
|
dojo.date.getWeekend=function(_b1a){
|
||
|
var _b1b={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4};
|
||
|
var _b1c={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6};
|
||
|
_b1a=dojo.hostenv.normalizeLocale(_b1a);
|
||
|
var _b1d=_b1a.split("-")[1];
|
||
|
var _b1e=_b1b[_b1d];
|
||
|
var end=_b1c[_b1d];
|
||
|
if(typeof _b1e=="undefined"){
|
||
|
_b1e=6;
|
||
|
}
|
||
|
if(typeof end=="undefined"){
|
||
|
end=0;
|
||
|
}
|
||
|
return {start:_b1e,end:end};
|
||
|
};
|
||
|
dojo.date.isWeekend=function(_b20,_b21){
|
||
|
var _b22=dojo.date.getWeekend(_b21);
|
||
|
var day=(_b20||new Date()).getDay();
|
||
|
if(_b22.end<_b22.start){
|
||
|
_b22.end+=7;
|
||
|
if(day<_b22.start){
|
||
|
day+=7;
|
||
|
}
|
||
|
}
|
||
|
return day>=_b22.start&&day<=_b22.end;
|
||
|
};
|
||
|
dojo.provide("dojo.i18n.common");
|
||
|
dojo.i18n.getLocalization=function(_b24,_b25,_b26){
|
||
|
dojo.hostenv.preloadLocalizations();
|
||
|
_b26=dojo.hostenv.normalizeLocale(_b26);
|
||
|
var _b27=_b26.split("-");
|
||
|
var _b28=[_b24,"nls",_b25].join(".");
|
||
|
var _b29=dojo.hostenv.findModule(_b28,true);
|
||
|
var _b2a;
|
||
|
for(var i=_b27.length;i>0;i--){
|
||
|
var loc=_b27.slice(0,i).join("_");
|
||
|
if(_b29[loc]){
|
||
|
_b2a=_b29[loc];
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
if(!_b2a){
|
||
|
_b2a=_b29.ROOT;
|
||
|
}
|
||
|
if(_b2a){
|
||
|
var _b2d=function(){
|
||
|
};
|
||
|
_b2d.prototype=_b2a;
|
||
|
return new _b2d();
|
||
|
}
|
||
|
dojo.raise("Bundle not found: "+_b25+" in "+_b24+" , locale="+_b26);
|
||
|
};
|
||
|
dojo.i18n.isLTR=function(_b2e){
|
||
|
var lang=dojo.hostenv.normalizeLocale(_b2e).split("-")[0];
|
||
|
var RTL={ar:true,fa:true,he:true,ur:true,yi:true};
|
||
|
return !RTL[lang];
|
||
|
};
|
||
|
dojo.provide("dojo.date.format");
|
||
|
(function(){
|
||
|
dojo.date.format=function(_b31,_b32){
|
||
|
if(typeof _b32=="string"){
|
||
|
dojo.deprecated("dojo.date.format","To format dates with POSIX-style strings, please use dojo.date.strftime instead","0.5");
|
||
|
return dojo.date.strftime(_b31,_b32);
|
||
|
}
|
||
|
function formatPattern(_b33,_b34){
|
||
|
return _b34.replace(/([a-z])\1*/ig,function(_b35){
|
||
|
var s;
|
||
|
var c=_b35.charAt(0);
|
||
|
var l=_b35.length;
|
||
|
var pad;
|
||
|
var _b3a=["abbr","wide","narrow"];
|
||
|
switch(c){
|
||
|
case "G":
|
||
|
if(l>3){
|
||
|
dojo.unimplemented("Era format not implemented");
|
||
|
}
|
||
|
s=info.eras[_b33.getFullYear()<0?1:0];
|
||
|
break;
|
||
|
case "y":
|
||
|
s=_b33.getFullYear();
|
||
|
switch(l){
|
||
|
case 1:
|
||
|
break;
|
||
|
case 2:
|
||
|
s=String(s).substr(-2);
|
||
|
break;
|
||
|
default:
|
||
|
pad=true;
|
||
|
}
|
||
|
break;
|
||
|
case "Q":
|
||
|
case "q":
|
||
|
s=Math.ceil((_b33.getMonth()+1)/3);
|
||
|
switch(l){
|
||
|
case 1:
|
||
|
case 2:
|
||
|
pad=true;
|
||
|
break;
|
||
|
case 3:
|
||
|
case 4:
|
||
|
dojo.unimplemented("Quarter format not implemented");
|
||
|
}
|
||
|
break;
|
||
|
case "M":
|
||
|
case "L":
|
||
|
var m=_b33.getMonth();
|
||
|
var _b3d;
|
||
|
switch(l){
|
||
|
case 1:
|
||
|
case 2:
|
||
|
s=m+1;
|
||
|
pad=true;
|
||
|
break;
|
||
|
case 3:
|
||
|
case 4:
|
||
|
case 5:
|
||
|
_b3d=_b3a[l-3];
|
||
|
break;
|
||
|
}
|
||
|
if(_b3d){
|
||
|
var type=(c=="L")?"standalone":"format";
|
||
|
var prop=["months",type,_b3d].join("-");
|
||
|
s=info[prop][m];
|
||
|
}
|
||
|
break;
|
||
|
case "w":
|
||
|
var _b40=0;
|
||
|
s=dojo.date.getWeekOfYear(_b33,_b40);
|
||
|
pad=true;
|
||
|
break;
|
||
|
case "d":
|
||
|
s=_b33.getDate();
|
||
|
pad=true;
|
||
|
break;
|
||
|
case "D":
|
||
|
s=dojo.date.getDayOfYear(_b33);
|
||
|
pad=true;
|
||
|
break;
|
||
|
case "E":
|
||
|
case "e":
|
||
|
case "c":
|
||
|
var d=_b33.getDay();
|
||
|
var _b3d;
|
||
|
switch(l){
|
||
|
case 1:
|
||
|
case 2:
|
||
|
if(c=="e"){
|
||
|
var _b42=dojo.date.getFirstDayOfWeek(_b32.locale);
|
||
|
d=(d-_b42+7)%7;
|
||
|
}
|
||
|
if(c!="c"){
|
||
|
s=d+1;
|
||
|
pad=true;
|
||
|
break;
|
||
|
}
|
||
|
case 3:
|
||
|
case 4:
|
||
|
case 5:
|
||
|
_b3d=_b3a[l-3];
|
||
|
break;
|
||
|
}
|
||
|
if(_b3d){
|
||
|
var type=(c=="c")?"standalone":"format";
|
||
|
var prop=["days",type,_b3d].join("-");
|
||
|
s=info[prop][d];
|
||
|
}
|
||
|
break;
|
||
|
case "a":
|
||
|
var _b43=(_b33.getHours()<12)?"am":"pm";
|
||
|
s=info[_b43];
|
||
|
break;
|
||
|
case "h":
|
||
|
case "H":
|
||
|
case "K":
|
||
|
case "k":
|
||
|
var h=_b33.getHours();
|
||
|
switch(c){
|
||
|
case "h":
|
||
|
s=(h%12)||12;
|
||
|
break;
|
||
|
case "H":
|
||
|
s=h;
|
||
|
break;
|
||
|
case "K":
|
||
|
s=(h%12);
|
||
|
break;
|
||
|
case "k":
|
||
|
s=h||24;
|
||
|
break;
|
||
|
}
|
||
|
pad=true;
|
||
|
break;
|
||
|
case "m":
|
||
|
s=_b33.getMinutes();
|
||
|
pad=true;
|
||
|
break;
|
||
|
case "s":
|
||
|
s=_b33.getSeconds();
|
||
|
pad=true;
|
||
|
break;
|
||
|
case "S":
|
||
|
s=Math.round(_b33.getMilliseconds()*Math.pow(10,l-3));
|
||
|
break;
|
||
|
case "v":
|
||
|
case "z":
|
||
|
s=dojo.date.getTimezoneName(_b33);
|
||
|
if(s){
|
||
|
break;
|
||
|
}
|
||
|
l=4;
|
||
|
case "Z":
|
||
|
var _b45=_b33.getTimezoneOffset();
|
||
|
var tz=[(_b45<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_b45)/60),2),dojo.string.pad(Math.abs(_b45)%60,2)];
|
||
|
if(l==4){
|
||
|
tz.splice(0,0,"GMT");
|
||
|
tz.splice(3,0,":");
|
||
|
}
|
||
|
s=tz.join("");
|
||
|
break;
|
||
|
case "Y":
|
||
|
case "u":
|
||
|
case "W":
|
||
|
case "F":
|
||
|
case "g":
|
||
|
case "A":
|
||
|
dojo.debug(_b35+" modifier not yet implemented");
|
||
|
s="?";
|
||
|
break;
|
||
|
default:
|
||
|
dojo.raise("dojo.date.format: invalid pattern char: "+_b34);
|
||
|
}
|
||
|
if(pad){
|
||
|
s=dojo.string.pad(s,l);
|
||
|
}
|
||
|
return s;
|
||
|
});
|
||
|
}
|
||
|
_b32=_b32||{};
|
||
|
var _b47=dojo.hostenv.normalizeLocale(_b32.locale);
|
||
|
var _b48=_b32.formatLength||"full";
|
||
|
var info=dojo.date._getGregorianBundle(_b47);
|
||
|
var str=[];
|
||
|
var _b4a=dojo.lang.curry(this,formatPattern,_b31);
|
||
|
if(_b32.selector!="timeOnly"){
|
||
|
var _b4b=_b32.datePattern||info["dateFormat-"+_b48];
|
||
|
if(_b4b){
|
||
|
str.push(_processPattern(_b4b,_b4a));
|
||
|
}
|
||
|
}
|
||
|
if(_b32.selector!="dateOnly"){
|
||
|
var _b4c=_b32.timePattern||info["timeFormat-"+_b48];
|
||
|
if(_b4c){
|
||
|
str.push(_processPattern(_b4c,_b4a));
|
||
|
}
|
||
|
}
|
||
|
var _b4d=str.join(" ");
|
||
|
return _b4d;
|
||
|
};
|
||
|
dojo.date.parse=function(_b4e,_b4f){
|
||
|
_b4f=_b4f||{};
|
||
|
var _b50=dojo.hostenv.normalizeLocale(_b4f.locale);
|
||
|
var info=dojo.date._getGregorianBundle(_b50);
|
||
|
var _b52=_b4f.formatLength||"full";
|
||
|
if(!_b4f.selector){
|
||
|
_b4f.selector="dateOnly";
|
||
|
}
|
||
|
var _b53=_b4f.datePattern||info["dateFormat-"+_b52];
|
||
|
var _b54=_b4f.timePattern||info["timeFormat-"+_b52];
|
||
|
var _b55;
|
||
|
if(_b4f.selector=="dateOnly"){
|
||
|
_b55=_b53;
|
||
|
}else{
|
||
|
if(_b4f.selector=="timeOnly"){
|
||
|
_b55=_b54;
|
||
|
}else{
|
||
|
if(_b4f.selector=="dateTime"){
|
||
|
_b55=_b53+" "+_b54;
|
||
|
}else{
|
||
|
var msg="dojo.date.parse: Unknown selector param passed: '"+_b4f.selector+"'.";
|
||
|
msg+=" Defaulting to date pattern.";
|
||
|
dojo.debug(msg);
|
||
|
_b55=_b53;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
var _b57=[];
|
||
|
var _b58=_processPattern(_b55,dojo.lang.curry(this,_buildDateTimeRE,_b57,info,_b4f));
|
||
|
var _b59=new RegExp("^"+_b58+"$");
|
||
|
var _b5a=_b59.exec(_b4e);
|
||
|
if(!_b5a){
|
||
|
return null;
|
||
|
}
|
||
|
var _b5b=["abbr","wide","narrow"];
|
||
|
var _b5c=new Date(1972,0);
|
||
|
var _b5d={};
|
||
|
for(var i=1;i<_b5a.length;i++){
|
||
|
var grp=_b57[i-1];
|
||
|
var l=grp.length;
|
||
|
var v=_b5a[i];
|
||
|
switch(grp.charAt(0)){
|
||
|
case "y":
|
||
|
if(l!=2){
|
||
|
_b5c.setFullYear(v);
|
||
|
_b5d.year=v;
|
||
|
}else{
|
||
|
if(v<100){
|
||
|
v=Number(v);
|
||
|
var year=""+new Date().getFullYear();
|
||
|
var _b63=year.substring(0,2)*100;
|
||
|
var _b64=Number(year.substring(2,4));
|
||
|
var _b65=Math.min(_b64+20,99);
|
||
|
var num=(v<_b65)?_b63+v:_b63-100+v;
|
||
|
_b5c.setFullYear(num);
|
||
|
_b5d.year=num;
|
||
|
}else{
|
||
|
if(_b4f.strict){
|
||
|
return null;
|
||
|
}
|
||
|
_b5c.setFullYear(v);
|
||
|
_b5d.year=v;
|
||
|
}
|
||
|
}
|
||
|
break;
|
||
|
case "M":
|
||
|
if(l>2){
|
||
|
if(!_b4f.strict){
|
||
|
v=v.replace(/\./g,"");
|
||
|
v=v.toLowerCase();
|
||
|
}
|
||
|
var _b67=info["months-format-"+_b5b[l-3]].concat();
|
||
|
for(var j=0;j<_b67.length;j++){
|
||
|
if(!_b4f.strict){
|
||
|
_b67[j]=_b67[j].toLowerCase();
|
||
|
}
|
||
|
if(v==_b67[j]){
|
||
|
_b5c.setMonth(j);
|
||
|
_b5d.month=j;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
if(j==_b67.length){
|
||
|
dojo.debug("dojo.date.parse: Could not parse month name: '"+v+"'.");
|
||
|
return null;
|
||
|
}
|
||
|
}else{
|
||
|
_b5c.setMonth(v-1);
|
||
|
_b5d.month=v-1;
|
||
|
}
|
||
|
break;
|
||
|
case "E":
|
||
|
case "e":
|
||
|
if(!_b4f.strict){
|
||
|
v=v.toLowerCase();
|
||
|
}
|
||
|
var days=info["days-format-"+_b5b[l-3]].concat();
|
||
|
for(var j=0;j<days.length;j++){
|
||
|
if(!_b4f.strict){
|
||
|
days[j]=days[j].toLowerCase();
|
||
|
}
|
||
|
if(v==days[j]){
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
if(j==days.length){
|
||
|
dojo.debug("dojo.date.parse: Could not parse weekday name: '"+v+"'.");
|
||
|
return null;
|
||
|
}
|
||
|
break;
|
||
|
case "d":
|
||
|
_b5c.setDate(v);
|
||
|
_b5d.date=v;
|
||
|
break;
|
||
|
case "a":
|
||
|
var am=_b4f.am||info.am;
|
||
|
var pm=_b4f.pm||info.pm;
|
||
|
if(!_b4f.strict){
|
||
|
v=v.replace(/\./g,"").toLowerCase();
|
||
|
am=am.replace(/\./g,"").toLowerCase();
|
||
|
pm=pm.replace(/\./g,"").toLowerCase();
|
||
|
}
|
||
|
if(_b4f.strict&&v!=am&&v!=pm){
|
||
|
dojo.debug("dojo.date.parse: Could not parse am/pm part.");
|
||
|
return null;
|
||
|
}
|
||
|
var _b6c=_b5c.getHours();
|
||
|
if(v==pm&&_b6c<12){
|
||
|
_b5c.setHours(_b6c+12);
|
||
|
}else{
|
||
|
if(v==am&&_b6c==12){
|
||
|
_b5c.setHours(0);
|
||
|
}
|
||
|
}
|
||
|
break;
|
||
|
case "K":
|
||
|
if(v==24){
|
||
|
v=0;
|
||
|
}
|
||
|
case "h":
|
||
|
case "H":
|
||
|
case "k":
|
||
|
if(v>23){
|
||
|
dojo.debug("dojo.date.parse: Illegal hours value");
|
||
|
return null;
|
||
|
}
|
||
|
_b5c.setHours(v);
|
||
|
break;
|
||
|
case "m":
|
||
|
_b5c.setMinutes(v);
|
||
|
break;
|
||
|
case "s":
|
||
|
_b5c.setSeconds(v);
|
||
|
break;
|
||
|
case "S":
|
||
|
_b5c.setMilliseconds(v);
|
||
|
break;
|
||
|
default:
|
||
|
dojo.unimplemented("dojo.date.parse: unsupported pattern char="+grp.charAt(0));
|
||
|
}
|
||
|
}
|
||
|
if(_b5d.year&&_b5c.getFullYear()!=_b5d.year){
|
||
|
dojo.debug("Parsed year: '"+_b5c.getFullYear()+"' did not match input year: '"+_b5d.year+"'.");
|
||
|
return null;
|
||
|
}
|
||
|
if(_b5d.month&&_b5c.getMonth()!=_b5d.month){
|
||
|
dojo.debug("Parsed month: '"+_b5c.getMonth()+"' did not match input month: '"+_b5d.month+"'.");
|
||
|
return null;
|
||
|
}
|
||
|
if(_b5d.date&&_b5c.getDate()!=_b5d.date){
|
||
|
dojo.debug("Parsed day of month: '"+_b5c.getDate()+"' did not match input day of month: '"+_b5d.date+"'.");
|
||
|
return null;
|
||
|
}
|
||
|
return _b5c;
|
||
|
};
|
||
|
function _processPattern(_b6d,_b6e,_b6f,_b70){
|
||
|
var _b71=function(x){
|
||
|
return x;
|
||
|
};
|
||
|
_b6e=_b6e||_b71;
|
||
|
_b6f=_b6f||_b71;
|
||
|
_b70=_b70||_b71;
|
||
|
var _b73=_b6d.match(/(''|[^'])+/g);
|
||
|
var _b74=false;
|
||
|
for(var i=0;i<_b73.length;i++){
|
||
|
if(!_b73[i]){
|
||
|
_b73[i]="";
|
||
|
}else{
|
||
|
_b73[i]=(_b74?_b6f:_b6e)(_b73[i]);
|
||
|
_b74=!_b74;
|
||
|
}
|
||
|
}
|
||
|
return _b70(_b73.join(""));
|
||
|
}
|
||
|
function _buildDateTimeRE(_b76,info,_b78,_b79){
|
||
|
return _b79.replace(/([a-z])\1*/ig,function(_b7a){
|
||
|
var s;
|
||
|
var c=_b7a.charAt(0);
|
||
|
var l=_b7a.length;
|
||
|
switch(c){
|
||
|
case "y":
|
||
|
s="\\d"+((l==2)?"{2,4}":"+");
|
||
|
break;
|
||
|
case "M":
|
||
|
s=(l>2)?"\\S+":"\\d{1,2}";
|
||
|
break;
|
||
|
case "d":
|
||
|
s="\\d{1,2}";
|
||
|
break;
|
||
|
case "E":
|
||
|
s="\\S+";
|
||
|
break;
|
||
|
case "h":
|
||
|
case "H":
|
||
|
case "K":
|
||
|
case "k":
|
||
|
s="\\d{1,2}";
|
||
|
break;
|
||
|
case "m":
|
||
|
case "s":
|
||
|
s="[0-5]\\d";
|
||
|
break;
|
||
|
case "S":
|
||
|
s="\\d{1,3}";
|
||
|
break;
|
||
|
case "a":
|
||
|
var am=_b78.am||info.am||"AM";
|
||
|
var pm=_b78.pm||info.pm||"PM";
|
||
|
if(_b78.strict){
|
||
|
s=am+"|"+pm;
|
||
|
}else{
|
||
|
s=am;
|
||
|
s+=(am!=am.toLowerCase())?"|"+am.toLowerCase():"";
|
||
|
s+="|";
|
||
|
s+=(pm!=pm.toLowerCase())?pm+"|"+pm.toLowerCase():pm;
|
||
|
}
|
||
|
break;
|
||
|
default:
|
||
|
dojo.unimplemented("parse of date format, pattern="+_b79);
|
||
|
}
|
||
|
if(_b76){
|
||
|
_b76.push(_b7a);
|
||
|
}
|
||
|
return "\\s*("+s+")\\s*";
|
||
|
});
|
||
|
}
|
||
|
})();
|
||
|
dojo.date.strftime=function(_b80,_b81,_b82){
|
||
|
var _b83=null;
|
||
|
function _(s,n){
|
||
|
return dojo.string.pad(s,n||2,_b83||"0");
|
||
|
}
|
||
|
var info=dojo.date._getGregorianBundle(_b82);
|
||
|
function $(_b87){
|
||
|
switch(_b87){
|
||
|
case "a":
|
||
|
return dojo.date.getDayShortName(_b80,_b82);
|
||
|
case "A":
|
||
|
return dojo.date.getDayName(_b80,_b82);
|
||
|
case "b":
|
||
|
case "h":
|
||
|
return dojo.date.getMonthShortName(_b80,_b82);
|
||
|
case "B":
|
||
|
return dojo.date.getMonthName(_b80,_b82);
|
||
|
case "c":
|
||
|
return dojo.date.format(_b80,{locale:_b82});
|
||
|
case "C":
|
||
|
return _(Math.floor(_b80.getFullYear()/100));
|
||
|
case "d":
|
||
|
return _(_b80.getDate());
|
||
|
case "D":
|
||
|
return $("m")+"/"+$("d")+"/"+$("y");
|
||
|
case "e":
|
||
|
if(_b83==null){
|
||
|
_b83=" ";
|
||
|
}
|
||
|
return _(_b80.getDate());
|
||
|
case "f":
|
||
|
if(_b83==null){
|
||
|
_b83=" ";
|
||
|
}
|
||
|
return _(_b80.getMonth()+1);
|
||
|
case "g":
|
||
|
break;
|
||
|
case "G":
|
||
|
dojo.unimplemented("unimplemented modifier 'G'");
|
||
|
break;
|
||
|
case "F":
|
||
|
return $("Y")+"-"+$("m")+"-"+$("d");
|
||
|
case "H":
|
||
|
return _(_b80.getHours());
|
||
|
case "I":
|
||
|
return _(_b80.getHours()%12||12);
|
||
|
case "j":
|
||
|
return _(dojo.date.getDayOfYear(_b80),3);
|
||
|
case "k":
|
||
|
if(_b83==null){
|
||
|
_b83=" ";
|
||
|
}
|
||
|
return _(_b80.getHours());
|
||
|
case "l":
|
||
|
if(_b83==null){
|
||
|
_b83=" ";
|
||
|
}
|
||
|
return _(_b80.getHours()%12||12);
|
||
|
case "m":
|
||
|
return _(_b80.getMonth()+1);
|
||
|
case "M":
|
||
|
return _(_b80.getMinutes());
|
||
|
case "n":
|
||
|
return "\n";
|
||
|
case "p":
|
||
|
return info[_b80.getHours()<12?"am":"pm"];
|
||
|
case "r":
|
||
|
return $("I")+":"+$("M")+":"+$("S")+" "+$("p");
|
||
|
case "R":
|
||
|
return $("H")+":"+$("M");
|
||
|
case "S":
|
||
|
return _(_b80.getSeconds());
|
||
|
case "t":
|
||
|
return "\t";
|
||
|
case "T":
|
||
|
return $("H")+":"+$("M")+":"+$("S");
|
||
|
case "u":
|
||
|
return String(_b80.getDay()||7);
|
||
|
case "U":
|
||
|
return _(dojo.date.getWeekOfYear(_b80));
|
||
|
case "V":
|
||
|
return _(dojo.date.getIsoWeekOfYear(_b80));
|
||
|
case "W":
|
||
|
return _(dojo.date.getWeekOfYear(_b80,1));
|
||
|
case "w":
|
||
|
return String(_b80.getDay());
|
||
|
case "x":
|
||
|
return dojo.date.format(_b80,{selector:"dateOnly",locale:_b82});
|
||
|
case "X":
|
||
|
return dojo.date.format(_b80,{selector:"timeOnly",locale:_b82});
|
||
|
case "y":
|
||
|
return _(_b80.getFullYear()%100);
|
||
|
case "Y":
|
||
|
return String(_b80.getFullYear());
|
||
|
case "z":
|
||
|
var _b88=_b80.getTimezoneOffset();
|
||
|
return (_b88>0?"-":"+")+_(Math.floor(Math.abs(_b88)/60))+":"+_(Math.abs(_b88)%60);
|
||
|
case "Z":
|
||
|
return dojo.date.getTimezoneName(_b80);
|
||
|
case "%":
|
||
|
return "%";
|
||
|
}
|
||
|
}
|
||
|
var _b89="";
|
||
|
var i=0;
|
||
|
var _b8b=0;
|
||
|
var _b8c=null;
|
||
|
while((_b8b=_b81.indexOf("%",i))!=-1){
|
||
|
_b89+=_b81.substring(i,_b8b++);
|
||
|
switch(_b81.charAt(_b8b++)){
|
||
|
case "_":
|
||
|
_b83=" ";
|
||
|
break;
|
||
|
case "-":
|
||
|
_b83="";
|
||
|
break;
|
||
|
case "0":
|
||
|
_b83="0";
|
||
|
break;
|
||
|
case "^":
|
||
|
_b8c="upper";
|
||
|
break;
|
||
|
case "*":
|
||
|
_b8c="lower";
|
||
|
break;
|
||
|
case "#":
|
||
|
_b8c="swap";
|
||
|
break;
|
||
|
default:
|
||
|
_b83=null;
|
||
|
_b8b--;
|
||
|
break;
|
||
|
}
|
||
|
var _b8d=$(_b81.charAt(_b8b++));
|
||
|
switch(_b8c){
|
||
|
case "upper":
|
||
|
_b8d=_b8d.toUpperCase();
|
||
|
break;
|
||
|
case "lower":
|
||
|
_b8d=_b8d.toLowerCase();
|
||
|
break;
|
||
|
case "swap":
|
||
|
var _b8e=_b8d.toLowerCase();
|
||
|
var _b8f="";
|
||
|
var j=0;
|
||
|
var ch="";
|
||
|
while(j<_b8d.length){
|
||
|
ch=_b8d.charAt(j);
|
||
|
_b8f+=(ch==_b8e.charAt(j))?ch.toUpperCase():ch.toLowerCase();
|
||
|
j++;
|
||
|
}
|
||
|
_b8d=_b8f;
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
_b8c=null;
|
||
|
_b89+=_b8d;
|
||
|
i=_b8b;
|
||
|
}
|
||
|
_b89+=_b81.substring(i);
|
||
|
return _b89;
|
||
|
};
|
||
|
(function(){
|
||
|
var _b92=[];
|
||
|
dojo.date.addCustomFormats=function(_b93,_b94){
|
||
|
_b92.push({pkg:_b93,name:_b94});
|
||
|
};
|
||
|
dojo.date._getGregorianBundle=function(_b95){
|
||
|
var _b96={};
|
||
|
dojo.lang.forEach(_b92,function(desc){
|
||
|
var _b98=dojo.i18n.getLocalization(desc.pkg,desc.name,_b95);
|
||
|
_b96=dojo.lang.mixin(_b96,_b98);
|
||
|
},this);
|
||
|
return _b96;
|
||
|
};
|
||
|
})();
|
||
|
dojo.date.addCustomFormats("dojo.i18n.calendar","gregorian");
|
||
|
dojo.date.addCustomFormats("dojo.i18n.calendar","gregorianExtras");
|
||
|
dojo.date.getNames=function(item,type,use,_b9c){
|
||
|
var _b9d;
|
||
|
var _b9e=dojo.date._getGregorianBundle(_b9c);
|
||
|
var _b9f=[item,use,type];
|
||
|
if(use=="standAlone"){
|
||
|
_b9d=_b9e[_b9f.join("-")];
|
||
|
}
|
||
|
_b9f[1]="format";
|
||
|
return (_b9d||_b9e[_b9f.join("-")]).concat();
|
||
|
};
|
||
|
dojo.date.getDayName=function(_ba0,_ba1){
|
||
|
return dojo.date.getNames("days","wide","format",_ba1)[_ba0.getDay()];
|
||
|
};
|
||
|
dojo.date.getDayShortName=function(_ba2,_ba3){
|
||
|
return dojo.date.getNames("days","abbr","format",_ba3)[_ba2.getDay()];
|
||
|
};
|
||
|
dojo.date.getMonthName=function(_ba4,_ba5){
|
||
|
return dojo.date.getNames("months","wide","format",_ba5)[_ba4.getMonth()];
|
||
|
};
|
||
|
dojo.date.getMonthShortName=function(_ba6,_ba7){
|
||
|
return dojo.date.getNames("months","abbr","format",_ba7)[_ba6.getMonth()];
|
||
|
};
|
||
|
dojo.date.toRelativeString=function(_ba8){
|
||
|
var now=new Date();
|
||
|
var diff=(now-_ba8)/1000;
|
||
|
var end=" ago";
|
||
|
var _bac=false;
|
||
|
if(diff<0){
|
||
|
_bac=true;
|
||
|
end=" from now";
|
||
|
diff=-diff;
|
||
|
}
|
||
|
if(diff<60){
|
||
|
diff=Math.round(diff);
|
||
|
return diff+" second"+(diff==1?"":"s")+end;
|
||
|
}
|
||
|
if(diff<60*60){
|
||
|
diff=Math.round(diff/60);
|
||
|
return diff+" minute"+(diff==1?"":"s")+end;
|
||
|
}
|
||
|
if(diff<60*60*24){
|
||
|
diff=Math.round(diff/3600);
|
||
|
return diff+" hour"+(diff==1?"":"s")+end;
|
||
|
}
|
||
|
if(diff<60*60*24*7){
|
||
|
diff=Math.round(diff/(3600*24));
|
||
|
if(diff==1){
|
||
|
return _bac?"Tomorrow":"Yesterday";
|
||
|
}else{
|
||
|
return diff+" days"+end;
|
||
|
}
|
||
|
}
|
||
|
return dojo.date.format(_ba8);
|
||
|
};
|
||
|
dojo.date.toSql=function(_bad,_bae){
|
||
|
return dojo.date.strftime(_bad,"%F"+!_bae?" %T":"");
|
||
|
};
|
||
|
dojo.date.fromSql=function(_baf){
|
||
|
var _bb0=_baf.split(/[\- :]/g);
|
||
|
while(_bb0.length<6){
|
||
|
_bb0.push(0);
|
||
|
}
|
||
|
return new Date(_bb0[0],(parseInt(_bb0[1],10)-1),_bb0[2],_bb0[3],_bb0[4],_bb0[5]);
|
||
|
};
|
||
|
dojo.provide("dojo.date.serialize");
|
||
|
dojo.date.setIso8601=function(_bb1,_bb2){
|
||
|
var _bb3=(_bb2.indexOf("T")==-1)?_bb2.split(" "):_bb2.split("T");
|
||
|
_bb1=dojo.date.setIso8601Date(_bb1,_bb3[0]);
|
||
|
if(_bb3.length==2){
|
||
|
_bb1=dojo.date.setIso8601Time(_bb1,_bb3[1]);
|
||
|
}
|
||
|
return _bb1;
|
||
|
};
|
||
|
dojo.date.fromIso8601=function(_bb4){
|
||
|
return dojo.date.setIso8601(new Date(0,0),_bb4);
|
||
|
};
|
||
|
dojo.date.setIso8601Date=function(_bb5,_bb6){
|
||
|
var _bb7="^([0-9]{4})((-?([0-9]{2})(-?([0-9]{2}))?)|"+"(-?([0-9]{3}))|(-?W([0-9]{2})(-?([1-7]))?))?$";
|
||
|
var d=_bb6.match(new RegExp(_bb7));
|
||
|
if(!d){
|
||
|
dojo.debug("invalid date string: "+_bb6);
|
||
|
return null;
|
||
|
}
|
||
|
var year=d[1];
|
||
|
var _bba=d[4];
|
||
|
var date=d[6];
|
||
|
var _bbc=d[8];
|
||
|
var week=d[10];
|
||
|
var _bbe=d[12]?d[12]:1;
|
||
|
_bb5.setFullYear(year);
|
||
|
if(_bbc){
|
||
|
_bb5.setMonth(0);
|
||
|
_bb5.setDate(Number(_bbc));
|
||
|
}else{
|
||
|
if(week){
|
||
|
_bb5.setMonth(0);
|
||
|
_bb5.setDate(1);
|
||
|
var gd=_bb5.getDay();
|
||
|
var day=gd?gd:7;
|
||
|
var _bc1=Number(_bbe)+(7*Number(week));
|
||
|
if(day<=4){
|
||
|
_bb5.setDate(_bc1+1-day);
|
||
|
}else{
|
||
|
_bb5.setDate(_bc1+8-day);
|
||
|
}
|
||
|
}else{
|
||
|
if(_bba){
|
||
|
_bb5.setDate(1);
|
||
|
_bb5.setMonth(_bba-1);
|
||
|
}
|
||
|
if(date){
|
||
|
_bb5.setDate(date);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return _bb5;
|
||
|
};
|
||
|
dojo.date.fromIso8601Date=function(_bc2){
|
||
|
return dojo.date.setIso8601Date(new Date(0,0),_bc2);
|
||
|
};
|
||
|
dojo.date.setIso8601Time=function(_bc3,_bc4){
|
||
|
var _bc5="Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$";
|
||
|
var d=_bc4.match(new RegExp(_bc5));
|
||
|
var _bc7=0;
|
||
|
if(d){
|
||
|
if(d[0]!="Z"){
|
||
|
_bc7=(Number(d[3])*60)+Number(d[5]);
|
||
|
_bc7*=((d[2]=="-")?1:-1);
|
||
|
}
|
||
|
_bc7-=_bc3.getTimezoneOffset();
|
||
|
_bc4=_bc4.substr(0,_bc4.length-d[0].length);
|
||
|
}
|
||
|
var _bc8="^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(.([0-9]+))?)?)?$";
|
||
|
d=_bc4.match(new RegExp(_bc8));
|
||
|
if(!d){
|
||
|
dojo.debug("invalid time string: "+_bc4);
|
||
|
return null;
|
||
|
}
|
||
|
var _bc9=d[1];
|
||
|
var mins=Number((d[3])?d[3]:0);
|
||
|
var secs=(d[5])?d[5]:0;
|
||
|
var ms=d[7]?(Number("0."+d[7])*1000):0;
|
||
|
_bc3.setHours(_bc9);
|
||
|
_bc3.setMinutes(mins);
|
||
|
_bc3.setSeconds(secs);
|
||
|
_bc3.setMilliseconds(ms);
|
||
|
if(_bc7!==0){
|
||
|
_bc3.setTime(_bc3.getTime()+_bc7*60000);
|
||
|
}
|
||
|
return _bc3;
|
||
|
};
|
||
|
dojo.date.fromIso8601Time=function(_bcd){
|
||
|
return dojo.date.setIso8601Time(new Date(0,0),_bcd);
|
||
|
};
|
||
|
dojo.date.toRfc3339=function(_bce,_bcf){
|
||
|
if(!_bce){
|
||
|
_bce=new Date();
|
||
|
}
|
||
|
var _=dojo.string.pad;
|
||
|
var _bd1=[];
|
||
|
if(_bcf!="timeOnly"){
|
||
|
var date=[_(_bce.getFullYear(),4),_(_bce.getMonth()+1,2),_(_bce.getDate(),2)].join("-");
|
||
|
_bd1.push(date);
|
||
|
}
|
||
|
if(_bcf!="dateOnly"){
|
||
|
var time=[_(_bce.getHours(),2),_(_bce.getMinutes(),2),_(_bce.getSeconds(),2)].join(":");
|
||
|
var _bd4=_bce.getTimezoneOffset();
|
||
|
time+=(_bd4>0?"-":"+")+_(Math.floor(Math.abs(_bd4)/60),2)+":"+_(Math.abs(_bd4)%60,2);
|
||
|
_bd1.push(time);
|
||
|
}
|
||
|
return _bd1.join("T");
|
||
|
};
|
||
|
dojo.date.fromRfc3339=function(_bd5){
|
||
|
if(_bd5.indexOf("Tany")!=-1){
|
||
|
_bd5=_bd5.replace("Tany","");
|
||
|
}
|
||
|
var _bd6=new Date();
|
||
|
return dojo.date.setIso8601(_bd6,_bd5);
|
||
|
};
|
||
|
dojo.provide("dojo.widget.DatePicker");
|
||
|
dojo.widget.defineWidget("dojo.widget.DatePicker",dojo.widget.HtmlWidget,{value:"",name:"",displayWeeks:6,adjustWeeks:false,startDate:"1492-10-12",endDate:"2941-10-12",weekStartsOn:"",staticDisplay:false,dayWidth:"narrow",classNames:{previous:"previousMonth",disabledPrevious:"previousMonthDisabled",current:"currentMonth",disabledCurrent:"currentMonthDisabled",next:"nextMonth",disabledNext:"nextMonthDisabled",currentDate:"currentDate",selectedDate:"selectedDate"},templateString:"<div class=\"datePickerContainer\" dojoAttachPoint=\"datePickerContainerNode\">\r\n\t<table cellspacing=\"0\" cellpadding=\"0\" class=\"calendarContainer\">\r\n\t\t<thead>\r\n\t\t\t<tr>\r\n\t\t\t\t<td class=\"monthWrapper\" valign=\"top\">\r\n\t\t\t\t\t<table class=\"monthContainer\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td class=\"monthCurve monthCurveTL\" valign=\"top\"></td>\r\n\t\t\t\t\t\t\t<td class=\"monthLabelContainer\" valign=\"top\">\r\n\t\t\t\t\t\t\t\t<span dojoAttachPoint=\"increaseWeekNode\" \r\n\t\t\t\t\t\t\t\t\tdojoAttachEvent=\"onClick: onIncrementWeek;\" \r\n\t\t\t\t\t\t\t\t\tclass=\"incrementControl increase\">\r\n\t\t\t\t\t\t\t\t\t<img src=\"${dojoWidgetModuleUri}templates/images/incrementMonth.png\" \r\n\t\t\t\t\t\t\t\t\talt=\"↓\" style=\"width:7px;height:5px;\" />\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t<span \r\n\t\t\t\t\t\t\t\t\tdojoAttachPoint=\"increaseMonthNode\" \r\n\t\t\t\t\t\t\t\t\tdojoAttachEvent=\"onClick: onIncrementMonth;\" class=\"incrementControl increase\">\r\n\t\t\t\t\t\t\t\t\t<img src=\"${dojoWidgetModuleUri}templates/images/incrementMonth.png\" \r\n\t\t\t\t\t\t\t\t\t\talt=\"↓\" dojoAttachPoint=\"incrementMonthImageNode\">\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t<span \r\n\t\t\t\t\t\t\t\t\tdojoAttachPoint=\"decreaseWeekNode\" \r\n\t\t\t\t\t\t\t\t\tdojoAttachEvent=\"onClick: onIncrementWeek;\" \r\n\t\t\t\t\t\t\t\t\tclass=\"incrementControl decrease\">\r\n\t\t\t\t\t\t\t\t\t<img src=\"${dojoWidgetModuleUri}templates/images/decrementMonth.png\" alt=\"↑\" style=\"width:7px;height:5px;\" />\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t<span \r\n\t\t\t\t\t\t\t\t\tdojoAttachPoint=\"decreaseMonthNode\" \r\n\t\t\t\t\t\t\t\t\tdojoAttachEvent=\"onClick: onIncrementMonth;\" class=\"incrementControl decrease\">\r\n\t\t\t\t\t\t\t\t\t<img src=\"${dojoWidgetModuleUri}templates/images/decrementMonth.png\" \r\n\t\t\t\t\t\t\t\t\t\talt=\"↑\" dojoAttachPoint=\"decrementMonthImageNode\">\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t<span dojoAttachPoint=\"monthLabelNode\" class=\"month\"></span>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td class=\"monthCurve monthCurveTR\" valign=\"top\"></td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</thead>\r\n\t\t<tbody>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan=\"3\">\r\n\t\t\t\t\t<table class=\"calendarBodyContainer\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t<tr dojoAttachPoint=\"dayLabelsRow\">\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t<tbody dojoAttachPoint=\"calendarDatesContainerNode\" \r\n\t\t\t\t\t\t\tdojoAttachEvent=\"onClick: _handleUiClick;\">\r\n\t\t\t\t\t\t\t<tr dojoAttachPoint=\"calendarWeekTemplate\">\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</tbody>\r\n\t\t<tfoot>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan=\"3\" class=\"yearWrapper\">\r\n\t\t\t\t\t<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"yearContainer\">\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td class=\"curveBL\" valign=\"top\"></td>\r\n\t\t\t\t\t\t\t<td valign=\"t
|
||
|
dojo.widget.DatePicker.superclass.postMixInProperties.apply(this,arguments);
|
||
|
if(!this.weekStartsOn){
|
||
|
this.weekStartsOn=dojo.date.getFirstDayOfWeek(this.lang);
|
||
|
}
|
||
|
this.today=new Date();
|
||
|
this.today.setHours(0,0,0,0);
|
||
|
if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){
|
||
|
this.value=new Date();
|
||
|
}else{
|
||
|
if(this.value&&(typeof this.value=="string")&&(this.value.split("-").length>2)){
|
||
|
this.value=dojo.date.fromRfc3339(this.value);
|
||
|
this.value.setHours(0,0,0,0);
|
||
|
}
|
||
|
}
|
||
|
},fillInTemplate:function(args,frag){
|
||
|
dojo.widget.DatePicker.superclass.fillInTemplate.apply(this,arguments);
|
||
|
var _bd9=this.getFragNodeRef(frag);
|
||
|
dojo.html.copyStyle(this.domNode,_bd9);
|
||
|
this.weekTemplate=dojo.dom.removeNode(this.calendarWeekTemplate);
|
||
|
this._preInitUI(this.value?this.value:this.today,false,true);
|
||
|
var _bda=dojo.lang.unnest(dojo.date.getNames("days",this.dayWidth,"standAlone",this.lang));
|
||
|
if(this.weekStartsOn>0){
|
||
|
for(var i=0;i<this.weekStartsOn;i++){
|
||
|
_bda.push(_bda.shift());
|
||
|
}
|
||
|
}
|
||
|
var _bdc=this.dayLabelsRow.getElementsByTagName("td");
|
||
|
for(i=0;i<7;i++){
|
||
|
_bdc.item(i).innerHTML=_bda[i];
|
||
|
}
|
||
|
if(this.value){
|
||
|
this.setValue(this.value);
|
||
|
}
|
||
|
},getValue:function(){
|
||
|
return dojo.date.toRfc3339(new Date(this.value),"dateOnly");
|
||
|
},getDate:function(){
|
||
|
return this.value;
|
||
|
},setValue:function(_bdd){
|
||
|
this.setDate(_bdd);
|
||
|
},setDate:function(_bde){
|
||
|
if(_bde==""){
|
||
|
this.value="";
|
||
|
this._preInitUI(this.curMonth,false,true);
|
||
|
}else{
|
||
|
if(typeof _bde=="string"){
|
||
|
this.value=dojo.date.fromRfc3339(_bde);
|
||
|
this.value.setHours(0,0,0,0);
|
||
|
}else{
|
||
|
this.value=new Date(_bde);
|
||
|
this.value.setHours(0,0,0,0);
|
||
|
}
|
||
|
}
|
||
|
if(this.selectedNode!=null){
|
||
|
dojo.html.removeClass(this.selectedNode,this.classNames.selectedDate);
|
||
|
}
|
||
|
if(this.clickedNode!=null){
|
||
|
dojo.debug("adding selectedDate");
|
||
|
dojo.html.addClass(this.clickedNode,this.classNames.selectedDate);
|
||
|
this.selectedNode=this.clickedNode;
|
||
|
}else{
|
||
|
this._preInitUI(this.value,false,true);
|
||
|
}
|
||
|
this.clickedNode=null;
|
||
|
this.onValueChanged(this.value);
|
||
|
},_preInitUI:function(_bdf,_be0,_be1){
|
||
|
if(typeof (this.startDate)=="string"){
|
||
|
this.startDate=dojo.date.fromRfc3339(this.startDate);
|
||
|
}
|
||
|
if(typeof (this.endDate)=="string"){
|
||
|
this.endDate=dojo.date.fromRfc3339(this.endDate);
|
||
|
}
|
||
|
this.startDate.setHours(0,0,0,0);
|
||
|
this.endDate.setHours(24,0,0,-1);
|
||
|
if(_bdf<this.startDate||_bdf>this.endDate){
|
||
|
_bdf=new Date((_bdf<this.startDate)?this.startDate:this.endDate);
|
||
|
}
|
||
|
this.firstDay=this._initFirstDay(_bdf,_be0);
|
||
|
this.selectedIsUsed=false;
|
||
|
this.currentIsUsed=false;
|
||
|
var _be2=new Date(this.firstDay);
|
||
|
var _be3=_be2.getMonth();
|
||
|
this.curMonth=new Date(_be2);
|
||
|
this.curMonth.setDate(_be2.getDate()+6);
|
||
|
this.curMonth.setDate(1);
|
||
|
if(this.displayWeeks==""||this.adjustWeeks){
|
||
|
this.adjustWeeks=true;
|
||
|
this.displayWeeks=Math.ceil((dojo.date.getDaysInMonth(this.curMonth)+this._getAdjustedDay(this.curMonth))/7);
|
||
|
}
|
||
|
var days=this.displayWeeks*7;
|
||
|
if(dojo.date.diff(this.startDate,this.endDate,dojo.date.dateParts.DAY)<days){
|
||
|
this.staticDisplay=true;
|
||
|
if(dojo.date.diff(_be2,this.endDate,dojo.date.dateParts.DAY)>days){
|
||
|
this._preInitUI(this.startDate,true,false);
|
||
|
_be2=new Date(this.firstDay);
|
||
|
}
|
||
|
this.curMonth=new Date(_be2);
|
||
|
this.curMonth.setDate(_be2.getDate()+6);
|
||
|
this.curMonth.setDate(1);
|
||
|
var _be5=(_be2.getMonth()==this.curMonth.getMonth())?"current":"previous";
|
||
|
}
|
||
|
if(_be1){
|
||
|
this._initUI(days);
|
||
|
}
|
||
|
},_initUI:function(days){
|
||
|
dojo.dom.removeChildren(this.calendarDatesContainerNode);
|
||
|
for(var i=0;i<this.displayWeeks;i++){
|
||
|
this.calendarDatesContainerNode.appendChild(this.weekTemplate.cloneNode(true));
|
||
|
}
|
||
|
var _be8=new Date(this.firstDay);
|
||
|
this._setMonthLabel(this.curMonth.getMonth());
|
||
|
this._setYearLabels(this.curMonth.getFullYear());
|
||
|
var _be9=this.calendarDatesContainerNode.getElementsByTagName("td");
|
||
|
var _bea=this.calendarDatesContainerNode.getElementsByTagName("tr");
|
||
|
var _beb;
|
||
|
for(i=0;i<days;i++){
|
||
|
_beb=_be9.item(i);
|
||
|
_beb.innerHTML=_be8.getDate();
|
||
|
_beb.setAttribute("djDateValue",_be8.valueOf());
|
||
|
var _bec=(_be8.getMonth()!=this.curMonth.getMonth()&&Number(_be8)<Number(this.curMonth))?"previous":(_be8.getMonth()==this.curMonth.getMonth())?"current":"next";
|
||
|
var _bed=_bec;
|
||
|
if(this._isDisabledDate(_be8)){
|
||
|
var _bee={previous:"disabledPrevious",current:"disabledCurrent",next:"disabledNext"};
|
||
|
_bed=_bee[_bec];
|
||
|
}
|
||
|
dojo.html.setClass(_beb,this._getDateClassName(_be8,_bed));
|
||
|
if(dojo.html.hasClass(_beb,this.classNames.selectedDate)){
|
||
|
this.selectedNode=_beb;
|
||
|
}
|
||
|
_be8=dojo.date.add(_be8,dojo.date.dateParts.DAY,1);
|
||
|
}
|
||
|
this.lastDay=dojo.date.add(_be8,dojo.date.dateParts.DAY,-1);
|
||
|
this._initControls();
|
||
|
},_initControls:function(){
|
||
|
var d=this.firstDay;
|
||
|
var d2=this.lastDay;
|
||
|
var _bf1,_bf2,_bf3,_bf4,_bf5,_bf6;
|
||
|
_bf1=_bf2=_bf3=_bf4=_bf5=_bf6=!this.staticDisplay;
|
||
|
with(dojo.date.dateParts){
|
||
|
var add=dojo.date.add;
|
||
|
if(_bf1&&add(d,DAY,(-1*(this._getAdjustedDay(d)+1)))<this.startDate){
|
||
|
_bf1=_bf3=_bf5=false;
|
||
|
}
|
||
|
if(_bf2&&d2>this.endDate){
|
||
|
_bf2=_bf4=_bf6=false;
|
||
|
}
|
||
|
if(_bf3&&add(d,DAY,-1)<this.startDate){
|
||
|
_bf3=_bf5=false;
|
||
|
}
|
||
|
if(_bf4&&add(d2,DAY,1)>this.endDate){
|
||
|
_bf4=_bf6=false;
|
||
|
}
|
||
|
if(_bf5&&add(d2,YEAR,-1)<this.startDate){
|
||
|
_bf5=false;
|
||
|
}
|
||
|
if(_bf6&&add(d,YEAR,1)>this.endDate){
|
||
|
_bf6=false;
|
||
|
}
|
||
|
}
|
||
|
function enableControl(node,_bf9){
|
||
|
dojo.html.setVisibility(node,_bf9?"":"hidden");
|
||
|
}
|
||
|
enableControl(this.decreaseWeekNode,_bf1);
|
||
|
enableControl(this.increaseWeekNode,_bf2);
|
||
|
enableControl(this.decreaseMonthNode,_bf3);
|
||
|
enableControl(this.increaseMonthNode,_bf4);
|
||
|
enableControl(this.previousYearLabelNode,_bf5);
|
||
|
enableControl(this.nextYearLabelNode,_bf6);
|
||
|
},_incrementWeek:function(evt){
|
||
|
var d=new Date(this.firstDay);
|
||
|
switch(evt.target){
|
||
|
case this.increaseWeekNode.getElementsByTagName("img").item(0):
|
||
|
case this.increaseWeekNode:
|
||
|
var _bfc=dojo.date.add(d,dojo.date.dateParts.WEEK,1);
|
||
|
if(_bfc<this.endDate){
|
||
|
d=dojo.date.add(d,dojo.date.dateParts.WEEK,1);
|
||
|
}
|
||
|
break;
|
||
|
case this.decreaseWeekNode.getElementsByTagName("img").item(0):
|
||
|
case this.decreaseWeekNode:
|
||
|
if(d>=this.startDate){
|
||
|
d=dojo.date.add(d,dojo.date.dateParts.WEEK,-1);
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
this._preInitUI(d,true,true);
|
||
|
},_incrementMonth:function(evt){
|
||
|
var d=new Date(this.curMonth);
|
||
|
var _bff=new Date(this.firstDay);
|
||
|
switch(evt.currentTarget){
|
||
|
case this.increaseMonthNode.getElementsByTagName("img").item(0):
|
||
|
case this.increaseMonthNode:
|
||
|
_bff=dojo.date.add(_bff,dojo.date.dateParts.DAY,this.displayWeeks*7);
|
||
|
if(_bff<this.endDate){
|
||
|
d=dojo.date.add(d,dojo.date.dateParts.MONTH,1);
|
||
|
}else{
|
||
|
var _c00=true;
|
||
|
}
|
||
|
break;
|
||
|
case this.decreaseMonthNode.getElementsByTagName("img").item(0):
|
||
|
case this.decreaseMonthNode:
|
||
|
if(_bff>this.startDate){
|
||
|
d=dojo.date.add(d,dojo.date.dateParts.MONTH,-1);
|
||
|
}else{
|
||
|
var _c01=true;
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
if(_c01){
|
||
|
d=new Date(this.startDate);
|
||
|
}else{
|
||
|
if(_c00){
|
||
|
d=new Date(this.endDate);
|
||
|
}
|
||
|
}
|
||
|
this._preInitUI(d,false,true);
|
||
|
},_incrementYear:function(evt){
|
||
|
var year=this.curMonth.getFullYear();
|
||
|
var _c04=new Date(this.firstDay);
|
||
|
switch(evt.target){
|
||
|
case this.nextYearLabelNode:
|
||
|
_c04=dojo.date.add(_c04,dojo.date.dateParts.YEAR,1);
|
||
|
if(_c04<this.endDate){
|
||
|
year++;
|
||
|
}else{
|
||
|
var _c05=true;
|
||
|
}
|
||
|
break;
|
||
|
case this.previousYearLabelNode:
|
||
|
_c04=dojo.date.add(_c04,dojo.date.dateParts.YEAR,-1);
|
||
|
if(_c04>this.startDate){
|
||
|
year--;
|
||
|
}else{
|
||
|
var _c06=true;
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
var d;
|
||
|
if(_c06){
|
||
|
d=new Date(this.startDate);
|
||
|
}else{
|
||
|
if(_c05){
|
||
|
d=new Date(this.endDate);
|
||
|
}else{
|
||
|
d=new Date(year,this.curMonth.getMonth(),1);
|
||
|
}
|
||
|
}
|
||
|
this._preInitUI(d,false,true);
|
||
|
},onIncrementWeek:function(evt){
|
||
|
evt.stopPropagation();
|
||
|
if(!this.staticDisplay){
|
||
|
this._incrementWeek(evt);
|
||
|
}
|
||
|
},onIncrementMonth:function(evt){
|
||
|
evt.stopPropagation();
|
||
|
if(!this.staticDisplay){
|
||
|
this._incrementMonth(evt);
|
||
|
}
|
||
|
},onIncrementYear:function(evt){
|
||
|
evt.stopPropagation();
|
||
|
if(!this.staticDisplay){
|
||
|
this._incrementYear(evt);
|
||
|
}
|
||
|
},_setMonthLabel:function(_c0b){
|
||
|
this.monthLabelNode.innerHTML=dojo.date.getNames("months","wide","standAlone",this.lang)[_c0b];
|
||
|
},_setYearLabels:function(year){
|
||
|
var y=year-1;
|
||
|
var that=this;
|
||
|
function f(n){
|
||
|
that[n+"YearLabelNode"].innerHTML=dojo.date.format(new Date(y++,0),{formatLength:"yearOnly",locale:that.lang});
|
||
|
}
|
||
|
f("previous");
|
||
|
f("current");
|
||
|
f("next");
|
||
|
},_getDateClassName:function(date,_c11){
|
||
|
var _c12=this.classNames[_c11];
|
||
|
if((!this.selectedIsUsed&&this.value)&&(Number(date)==Number(this.value))){
|
||
|
_c12=this.classNames.selectedDate+" "+_c12;
|
||
|
this.selectedIsUsed=true;
|
||
|
}
|
||
|
if((!this.currentIsUsed)&&(Number(date)==Number(this.today))){
|
||
|
_c12=_c12+" "+this.classNames.currentDate;
|
||
|
this.currentIsUsed=true;
|
||
|
}
|
||
|
return _c12;
|
||
|
},onClick:function(evt){
|
||
|
dojo.event.browser.stopEvent(evt);
|
||
|
},_handleUiClick:function(evt){
|
||
|
var _c15=evt.target;
|
||
|
if(_c15.nodeType!=dojo.dom.ELEMENT_NODE){
|
||
|
_c15=_c15.parentNode;
|
||
|
}
|
||
|
dojo.event.browser.stopEvent(evt);
|
||
|
this.selectedIsUsed=this.todayIsUsed=false;
|
||
|
if(dojo.html.hasClass(_c15,this.classNames["disabledPrevious"])||dojo.html.hasClass(_c15,this.classNames["disabledCurrent"])||dojo.html.hasClass(_c15,this.classNames["disabledNext"])){
|
||
|
return;
|
||
|
}
|
||
|
this.clickedNode=_c15;
|
||
|
this.setDate(new Date(Number(dojo.html.getAttribute(_c15,"djDateValue"))));
|
||
|
},onValueChanged:function(date){
|
||
|
},_isDisabledDate:function(_c17){
|
||
|
if(_c17<this.startDate||_c17>this.endDate){
|
||
|
return true;
|
||
|
}
|
||
|
return this.isDisabledDate(_c17,this.lang);
|
||
|
},isDisabledDate:function(_c18,_c19){
|
||
|
return false;
|
||
|
},_initFirstDay:function(_c1a,adj){
|
||
|
var d=new Date(_c1a);
|
||
|
if(!adj){
|
||
|
d.setDate(1);
|
||
|
}
|
||
|
d.setDate(d.getDate()-this._getAdjustedDay(d,this.weekStartsOn));
|
||
|
d.setHours(0,0,0,0);
|
||
|
return d;
|
||
|
},_getAdjustedDay:function(_c1d){
|
||
|
var days=[0,1,2,3,4,5,6];
|
||
|
if(this.weekStartsOn>0){
|
||
|
for(var i=0;i<this.weekStartsOn;i++){
|
||
|
days.unshift(days.pop());
|
||
|
}
|
||
|
}
|
||
|
return days[_c1d.getDay()];
|
||
|
},destroy:function(){
|
||
|
dojo.widget.DatePicker.superclass.destroy.apply(this,arguments);
|
||
|
dojo.html.destroyNode(this.weekTemplate);
|
||
|
}});
|
||
|
dojo.provide("dojo.widget.DropdownDatePicker");
|
||
|
dojo.widget.defineWidget("dojo.widget.DropdownDatePicker",dojo.widget.DropdownContainer,{iconURL:dojo.uri.moduleUri("dojo.widget","templates/images/dateIcon.gif"),formatLength:"short",displayFormat:"",saveFormat:"",value:"",name:"",displayWeeks:6,adjustWeeks:false,startDate:"1492-10-12",endDate:"2941-10-12",weekStartsOn:"",staticDisplay:false,postMixInProperties:function(_c20,frag){
|
||
|
dojo.widget.DropdownDatePicker.superclass.postMixInProperties.apply(this,arguments);
|
||
|
var _c22=dojo.i18n.getLocalization("dojo.widget","DropdownDatePicker",this.lang);
|
||
|
this.iconAlt=_c22.selectDate;
|
||
|
if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){
|
||
|
this.value=new Date();
|
||
|
}
|
||
|
if(this.value&&isNaN(this.value)){
|
||
|
var orig=this.value;
|
||
|
this.value=dojo.date.fromRfc3339(this.value);
|
||
|
if(!this.value){
|
||
|
this.value=new Date(orig);
|
||
|
dojo.deprecated("dojo.widget.DropdownDatePicker","date attributes must be passed in Rfc3339 format","0.5");
|
||
|
}
|
||
|
}
|
||
|
if(this.value&&!isNaN(this.value)){
|
||
|
this.value=new Date(this.value);
|
||
|
}
|
||
|
},fillInTemplate:function(args,frag){
|
||
|
dojo.widget.DropdownDatePicker.superclass.fillInTemplate.call(this,args,frag);
|
||
|
var _c26={widgetContainerId:this.widgetId,lang:this.lang,value:this.value,startDate:this.startDate,endDate:this.endDate,displayWeeks:this.displayWeeks,weekStartsOn:this.weekStartsOn,adjustWeeks:this.adjustWeeks,staticDisplay:this.staticDisplay};
|
||
|
this.datePicker=dojo.widget.createWidget("DatePicker",_c26,this.containerNode,"child");
|
||
|
dojo.event.connect(this.datePicker,"onValueChanged",this,"_updateText");
|
||
|
dojo.event.connect(this.inputNode,"onChange",this,"_updateText");
|
||
|
if(this.value){
|
||
|
this._updateText();
|
||
|
}
|
||
|
this.containerNode.explodeClassName="calendarBodyContainer";
|
||
|
this.valueNode.name=this.name;
|
||
|
},getValue:function(){
|
||
|
return this.valueNode.value;
|
||
|
},getDate:function(){
|
||
|
return this.datePicker.value;
|
||
|
},setValue:function(_c27){
|
||
|
this.setDate(_c27);
|
||
|
},setDate:function(_c28){
|
||
|
this.datePicker.setDate(_c28);
|
||
|
this._syncValueNode();
|
||
|
},_updateText:function(){
|
||
|
this.inputNode.value=this.datePicker.value?dojo.date.format(this.datePicker.value,{formatLength:this.formatLength,datePattern:this.displayFormat,selector:"dateOnly",locale:this.lang}):"";
|
||
|
if(this.value<this.datePicker.startDate||this.value>this.datePicker.endDate){
|
||
|
this.inputNode.value="";
|
||
|
}
|
||
|
this._syncValueNode();
|
||
|
this.onValueChanged(this.getDate());
|
||
|
this.hideContainer();
|
||
|
},onValueChanged:function(_c29){
|
||
|
},onInputChange:function(){
|
||
|
var _c2a=dojo.string.trim(this.inputNode.value);
|
||
|
if(_c2a){
|
||
|
var _c2b=dojo.date.parse(_c2a,{formatLength:this.formatLength,datePattern:this.displayFormat,selector:"dateOnly",locale:this.lang});
|
||
|
if(!this.datePicker._isDisabledDate(_c2b)){
|
||
|
this.setDate(_c2b);
|
||
|
}
|
||
|
}else{
|
||
|
if(_c2a==""){
|
||
|
this.datePicker.setDate("");
|
||
|
}
|
||
|
this.valueNode.value=_c2a;
|
||
|
}
|
||
|
if(_c2a){
|
||
|
this._updateText();
|
||
|
}
|
||
|
},_syncValueNode:function(){
|
||
|
var date=this.datePicker.value;
|
||
|
var _c2d="";
|
||
|
switch(this.saveFormat.toLowerCase()){
|
||
|
case "rfc":
|
||
|
case "iso":
|
||
|
case "":
|
||
|
_c2d=dojo.date.toRfc3339(date,"dateOnly");
|
||
|
break;
|
||
|
case "posix":
|
||
|
case "unix":
|
||
|
_c2d=Number(date);
|
||
|
break;
|
||
|
default:
|
||
|
if(date){
|
||
|
_c2d=dojo.date.format(date,{datePattern:this.saveFormat,selector:"dateOnly",locale:this.lang});
|
||
|
}
|
||
|
}
|
||
|
this.valueNode.value=_c2d;
|
||
|
},destroy:function(_c2e){
|
||
|
this.datePicker.destroy(_c2e);
|
||
|
dojo.widget.DropdownDatePicker.superclass.destroy.apply(this,arguments);
|
||
|
}});
|
||
|
dojo.kwCompoundRequire({common:["dojo.dnd.DragAndDrop"],browser:["dojo.dnd.HtmlDragAndDrop"],dashboard:["dojo.dnd.HtmlDragAndDrop"]});
|
||
|
dojo.provide("dojo.dnd.*");
|
||
|
|