Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1318 alexandre_ 1
/*
2
	Copyright (c) 2004-2006, The Dojo Foundation
3
	All Rights Reserved.
4
 
5
	Licensed under the Academic Free License version 2.1 or above OR the
6
	modified BSD license. For more information on Dojo licensing, see:
7
 
8
		http://dojotoolkit.org/community/licensing.shtml
9
*/
10
 
11
/*
12
	This is a compiled version of Dojo, built for deployment and not for
13
	development. To get an editable version, please visit:
14
 
15
		http://dojotoolkit.org
16
 
17
	for documentation and information on getting the source.
18
*/
19
 
20
if(typeof dojo=="undefined"){
21
var dj_global=this;
22
var dj_currentContext=this;
23
function dj_undef(_1,_2){
24
return (typeof (_2||dj_currentContext)[_1]=="undefined");
25
}
26
if(dj_undef("djConfig",this)){
27
var djConfig={};
28
}
29
if(dj_undef("dojo",this)){
30
var dojo={};
31
}
32
dojo.global=function(){
33
return dj_currentContext;
34
};
35
dojo.locale=djConfig.locale;
1422 alexandre_ 36
dojo.version={major:0,minor:4,patch:3,flag:"",revision:Number("$Rev: 8617 $".match(/[0-9]+/)[0]),toString:function(){
1318 alexandre_ 37
with(dojo.version){
38
return major+"."+minor+"."+patch+flag+" ("+revision+")";
39
}
40
}};
41
dojo.evalProp=function(_3,_4,_5){
42
if((!_4)||(!_3)){
43
return undefined;
44
}
45
if(!dj_undef(_3,_4)){
46
return _4[_3];
47
}
48
return (_5?(_4[_3]={}):undefined);
49
};
50
dojo.parseObjPath=function(_6,_7,_8){
51
var _9=(_7||dojo.global());
52
var _a=_6.split(".");
53
var _b=_a.pop();
54
for(var i=0,l=_a.length;i<l&&_9;i++){
55
_9=dojo.evalProp(_a[i],_9,_8);
56
}
57
return {obj:_9,prop:_b};
58
};
59
dojo.evalObjPath=function(_e,_f){
60
if(typeof _e!="string"){
61
return dojo.global();
62
}
63
if(_e.indexOf(".")==-1){
64
return dojo.evalProp(_e,dojo.global(),_f);
65
}
66
var ref=dojo.parseObjPath(_e,dojo.global(),_f);
67
if(ref){
68
return dojo.evalProp(ref.prop,ref.obj,_f);
69
}
70
return null;
71
};
72
dojo.errorToString=function(_11){
73
if(!dj_undef("message",_11)){
74
return _11.message;
75
}else{
76
if(!dj_undef("description",_11)){
77
return _11.description;
78
}else{
79
return _11;
80
}
81
}
82
};
83
dojo.raise=function(_12,_13){
84
if(_13){
85
_12=_12+": "+dojo.errorToString(_13);
86
}else{
87
_12=dojo.errorToString(_12);
88
}
89
try{
90
if(djConfig.isDebug){
91
dojo.hostenv.println("FATAL exception raised: "+_12);
92
}
93
}
94
catch(e){
95
}
96
throw _13||Error(_12);
97
};
98
dojo.debug=function(){
99
};
100
dojo.debugShallow=function(obj){
101
};
102
dojo.profile={start:function(){
103
},end:function(){
104
},stop:function(){
105
},dump:function(){
106
}};
107
function dj_eval(_15){
108
return dj_global.eval?dj_global.eval(_15):eval(_15);
109
}
110
dojo.unimplemented=function(_16,_17){
111
var _18="'"+_16+"' not implemented";
112
if(_17!=null){
113
_18+=" "+_17;
114
}
115
dojo.raise(_18);
116
};
117
dojo.deprecated=function(_19,_1a,_1b){
118
var _1c="DEPRECATED: "+_19;
119
if(_1a){
120
_1c+=" "+_1a;
121
}
122
if(_1b){
123
_1c+=" -- will be removed in version: "+_1b;
124
}
125
dojo.debug(_1c);
126
};
127
dojo.render=(function(){
128
function vscaffold(_1d,_1e){
129
var tmp={capable:false,support:{builtin:false,plugin:false},prefixes:_1d};
130
for(var i=0;i<_1e.length;i++){
131
tmp[_1e[i]]=false;
132
}
133
return tmp;
134
}
135
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"])};
136
})();
137
dojo.hostenv=(function(){
138
var _21={isDebug:false,allowQueryConfig:false,baseScriptUri:"",baseRelativePath:"",libraryScriptUri:"",iePreventClobber:false,ieClobberMinimal:true,preventBackButtonFix:true,delayMozLoadingFix:false,searchIds:[],parseWidgets:true};
139
if(typeof djConfig=="undefined"){
140
djConfig=_21;
141
}else{
142
for(var _22 in _21){
143
if(typeof djConfig[_22]=="undefined"){
144
djConfig[_22]=_21[_22];
145
}
146
}
147
}
148
return {name_:"(unset)",version_:"(unset)",getName:function(){
149
return this.name_;
150
},getVersion:function(){
151
return this.version_;
152
},getText:function(uri){
153
dojo.unimplemented("getText","uri="+uri);
154
}};
155
})();
156
dojo.hostenv.getBaseScriptUri=function(){
157
if(djConfig.baseScriptUri.length){
158
return djConfig.baseScriptUri;
159
}
160
var uri=new String(djConfig.libraryScriptUri||djConfig.baseRelativePath);
161
if(!uri){
162
dojo.raise("Nothing returned by getLibraryScriptUri(): "+uri);
163
}
164
var _25=uri.lastIndexOf("/");
165
djConfig.baseScriptUri=djConfig.baseRelativePath;
166
return djConfig.baseScriptUri;
167
};
168
(function(){
169
var _26={pkgFileName:"__package__",loading_modules_:{},loaded_modules_:{},addedToLoadingCount:[],removedFromLoadingCount:[],inFlightCount:0,modulePrefixes_:{dojo:{name:"dojo",value:"src"}},setModulePrefix:function(_27,_28){
170
this.modulePrefixes_[_27]={name:_27,value:_28};
171
},moduleHasPrefix:function(_29){
172
var mp=this.modulePrefixes_;
173
return Boolean(mp[_29]&&mp[_29].value);
174
},getModulePrefix:function(_2b){
175
if(this.moduleHasPrefix(_2b)){
176
return this.modulePrefixes_[_2b].value;
177
}
178
return _2b;
179
},getTextStack:[],loadUriStack:[],loadedUris:[],post_load_:false,modulesLoadedListeners:[],unloadListeners:[],loadNotifying:false};
180
for(var _2c in _26){
181
dojo.hostenv[_2c]=_26[_2c];
182
}
183
})();
184
dojo.hostenv.loadPath=function(_2d,_2e,cb){
185
var uri;
186
if(_2d.charAt(0)=="/"||_2d.match(/^\w+:/)){
187
uri=_2d;
188
}else{
189
uri=this.getBaseScriptUri()+_2d;
190
}
191
if(djConfig.cacheBust&&dojo.render.html.capable){
192
uri+="?"+String(djConfig.cacheBust).replace(/\W+/g,"");
193
}
194
try{
195
return !_2e?this.loadUri(uri,cb):this.loadUriAndCheck(uri,_2e,cb);
196
}
197
catch(e){
198
dojo.debug(e);
199
return false;
200
}
201
};
202
dojo.hostenv.loadUri=function(uri,cb){
203
if(this.loadedUris[uri]){
204
return true;
205
}
206
var _33=this.getText(uri,null,true);
207
if(!_33){
208
return false;
209
}
210
this.loadedUris[uri]=true;
211
if(cb){
212
_33="("+_33+")";
213
}
214
var _34=dj_eval(_33);
215
if(cb){
216
cb(_34);
217
}
218
return true;
219
};
220
dojo.hostenv.loadUriAndCheck=function(uri,_36,cb){
221
var ok=true;
222
try{
223
ok=this.loadUri(uri,cb);
224
}
225
catch(e){
226
dojo.debug("failed loading ",uri," with error: ",e);
227
}
228
return Boolean(ok&&this.findModule(_36,false));
229
};
230
dojo.loaded=function(){
231
};
232
dojo.unloaded=function(){
233
};
234
dojo.hostenv.loaded=function(){
235
this.loadNotifying=true;
236
this.post_load_=true;
237
var mll=this.modulesLoadedListeners;
238
for(var x=0;x<mll.length;x++){
239
mll[x]();
240
}
241
this.modulesLoadedListeners=[];
242
this.loadNotifying=false;
243
dojo.loaded();
244
};
245
dojo.hostenv.unloaded=function(){
246
var mll=this.unloadListeners;
247
while(mll.length){
248
(mll.pop())();
249
}
250
dojo.unloaded();
251
};
252
dojo.addOnLoad=function(obj,_3d){
253
var dh=dojo.hostenv;
254
if(arguments.length==1){
255
dh.modulesLoadedListeners.push(obj);
256
}else{
257
if(arguments.length>1){
258
dh.modulesLoadedListeners.push(function(){
259
obj[_3d]();
260
});
261
}
262
}
263
if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){
264
dh.callLoaded();
265
}
266
};
267
dojo.addOnUnload=function(obj,_40){
268
var dh=dojo.hostenv;
269
if(arguments.length==1){
270
dh.unloadListeners.push(obj);
271
}else{
272
if(arguments.length>1){
273
dh.unloadListeners.push(function(){
274
obj[_40]();
275
});
276
}
277
}
278
};
279
dojo.hostenv.modulesLoaded=function(){
280
if(this.post_load_){
281
return;
282
}
283
if(this.loadUriStack.length==0&&this.getTextStack.length==0){
284
if(this.inFlightCount>0){
285
dojo.debug("files still in flight!");
286
return;
287
}
288
dojo.hostenv.callLoaded();
289
}
290
};
291
dojo.hostenv.callLoaded=function(){
292
if(typeof setTimeout=="object"||(djConfig["useXDomain"]&&dojo.render.html.opera)){
293
setTimeout("dojo.hostenv.loaded();",0);
294
}else{
295
dojo.hostenv.loaded();
296
}
297
};
298
dojo.hostenv.getModuleSymbols=function(_42){
299
var _43=_42.split(".");
300
for(var i=_43.length;i>0;i--){
301
var _45=_43.slice(0,i).join(".");
302
if((i==1)&&!this.moduleHasPrefix(_45)){
303
_43[0]="../"+_43[0];
304
}else{
305
var _46=this.getModulePrefix(_45);
306
if(_46!=_45){
307
_43.splice(0,i,_46);
308
break;
309
}
310
}
311
}
312
return _43;
313
};
314
dojo.hostenv._global_omit_module_check=false;
315
dojo.hostenv.loadModule=function(_47,_48,_49){
316
if(!_47){
317
return;
318
}
319
_49=this._global_omit_module_check||_49;
320
var _4a=this.findModule(_47,false);
321
if(_4a){
322
return _4a;
323
}
324
if(dj_undef(_47,this.loading_modules_)){
325
this.addedToLoadingCount.push(_47);
326
}
327
this.loading_modules_[_47]=1;
328
var _4b=_47.replace(/\./g,"/")+".js";
329
var _4c=_47.split(".");
330
var _4d=this.getModuleSymbols(_47);
331
var _4e=((_4d[0].charAt(0)!="/")&&!_4d[0].match(/^\w+:/));
332
var _4f=_4d[_4d.length-1];
333
var ok;
334
if(_4f=="*"){
335
_47=_4c.slice(0,-1).join(".");
336
while(_4d.length){
337
_4d.pop();
338
_4d.push(this.pkgFileName);
339
_4b=_4d.join("/")+".js";
340
if(_4e&&_4b.charAt(0)=="/"){
341
_4b=_4b.slice(1);
342
}
343
ok=this.loadPath(_4b,!_49?_47:null);
344
if(ok){
345
break;
346
}
347
_4d.pop();
348
}
349
}else{
350
_4b=_4d.join("/")+".js";
351
_47=_4c.join(".");
352
var _51=!_49?_47:null;
353
ok=this.loadPath(_4b,_51);
354
if(!ok&&!_48){
355
_4d.pop();
356
while(_4d.length){
357
_4b=_4d.join("/")+".js";
358
ok=this.loadPath(_4b,_51);
359
if(ok){
360
break;
361
}
362
_4d.pop();
363
_4b=_4d.join("/")+"/"+this.pkgFileName+".js";
364
if(_4e&&_4b.charAt(0)=="/"){
365
_4b=_4b.slice(1);
366
}
367
ok=this.loadPath(_4b,_51);
368
if(ok){
369
break;
370
}
371
}
372
}
373
if(!ok&&!_49){
374
dojo.raise("Could not load '"+_47+"'; last tried '"+_4b+"'");
375
}
376
}
377
if(!_49&&!this["isXDomain"]){
378
_4a=this.findModule(_47,false);
379
if(!_4a){
380
dojo.raise("symbol '"+_47+"' is not defined after loading '"+_4b+"'");
381
}
382
}
383
return _4a;
384
};
385
dojo.hostenv.startPackage=function(_52){
386
var _53=String(_52);
387
var _54=_53;
388
var _55=_52.split(/\./);
389
if(_55[_55.length-1]=="*"){
390
_55.pop();
391
_54=_55.join(".");
392
}
393
var _56=dojo.evalObjPath(_54,true);
394
this.loaded_modules_[_53]=_56;
395
this.loaded_modules_[_54]=_56;
396
return _56;
397
};
398
dojo.hostenv.findModule=function(_57,_58){
399
var lmn=String(_57);
400
if(this.loaded_modules_[lmn]){
401
return this.loaded_modules_[lmn];
402
}
403
if(_58){
404
dojo.raise("no loaded module named '"+_57+"'");
405
}
406
return null;
407
};
408
dojo.kwCompoundRequire=function(_5a){
409
var _5b=_5a["common"]||[];
410
var _5c=_5a[dojo.hostenv.name_]?_5b.concat(_5a[dojo.hostenv.name_]||[]):_5b.concat(_5a["default"]||[]);
411
for(var x=0;x<_5c.length;x++){
412
var _5e=_5c[x];
413
if(_5e.constructor==Array){
414
dojo.hostenv.loadModule.apply(dojo.hostenv,_5e);
415
}else{
416
dojo.hostenv.loadModule(_5e);
417
}
418
}
419
};
420
dojo.require=function(_5f){
421
dojo.hostenv.loadModule.apply(dojo.hostenv,arguments);
422
};
423
dojo.requireIf=function(_60,_61){
424
var _62=arguments[0];
425
if((_62===true)||(_62=="common")||(_62&&dojo.render[_62].capable)){
426
var _63=[];
427
for(var i=1;i<arguments.length;i++){
428
_63.push(arguments[i]);
429
}
430
dojo.require.apply(dojo,_63);
431
}
432
};
433
dojo.requireAfterIf=dojo.requireIf;
434
dojo.provide=function(_65){
435
return dojo.hostenv.startPackage.apply(dojo.hostenv,arguments);
436
};
437
dojo.registerModulePath=function(_66,_67){
438
return dojo.hostenv.setModulePrefix(_66,_67);
439
};
440
if(djConfig["modulePaths"]){
441
for(var param in djConfig["modulePaths"]){
442
dojo.registerModulePath(param,djConfig["modulePaths"][param]);
443
}
444
}
445
dojo.setModulePrefix=function(_68,_69){
446
dojo.deprecated("dojo.setModulePrefix(\""+_68+"\", \""+_69+"\")","replaced by dojo.registerModulePath","0.5");
447
return dojo.registerModulePath(_68,_69);
448
};
449
dojo.exists=function(obj,_6b){
450
var p=_6b.split(".");
451
for(var i=0;i<p.length;i++){
452
if(!obj[p[i]]){
453
return false;
454
}
455
obj=obj[p[i]];
456
}
457
return true;
458
};
459
dojo.hostenv.normalizeLocale=function(_6e){
460
var _6f=_6e?_6e.toLowerCase():dojo.locale;
461
if(_6f=="root"){
462
_6f="ROOT";
463
}
464
return _6f;
465
};
466
dojo.hostenv.searchLocalePath=function(_70,_71,_72){
467
_70=dojo.hostenv.normalizeLocale(_70);
468
var _73=_70.split("-");
469
var _74=[];
470
for(var i=_73.length;i>0;i--){
471
_74.push(_73.slice(0,i).join("-"));
472
}
473
_74.push(false);
474
if(_71){
475
_74.reverse();
476
}
477
for(var j=_74.length-1;j>=0;j--){
478
var loc=_74[j]||"ROOT";
479
var _78=_72(loc);
480
if(_78){
481
break;
482
}
483
}
484
};
485
dojo.hostenv.localesGenerated;
486
dojo.hostenv.registerNlsPrefix=function(){
487
dojo.registerModulePath("nls","nls");
488
};
489
dojo.hostenv.preloadLocalizations=function(){
490
if(dojo.hostenv.localesGenerated){
491
dojo.hostenv.registerNlsPrefix();
492
function preload(_79){
493
_79=dojo.hostenv.normalizeLocale(_79);
494
dojo.hostenv.searchLocalePath(_79,true,function(loc){
495
for(var i=0;i<dojo.hostenv.localesGenerated.length;i++){
496
if(dojo.hostenv.localesGenerated[i]==loc){
497
dojo["require"]("nls.dojo_"+loc);
498
return true;
499
}
500
}
501
return false;
502
});
503
}
504
preload();
505
var _7c=djConfig.extraLocale||[];
506
for(var i=0;i<_7c.length;i++){
507
preload(_7c[i]);
508
}
509
}
510
dojo.hostenv.preloadLocalizations=function(){
511
};
512
};
513
dojo.requireLocalization=function(_7e,_7f,_80,_81){
514
dojo.hostenv.preloadLocalizations();
515
var _82=dojo.hostenv.normalizeLocale(_80);
516
var _83=[_7e,"nls",_7f].join(".");
517
var _84="";
518
if(_81){
519
var _85=_81.split(",");
520
for(var i=0;i<_85.length;i++){
521
if(_82.indexOf(_85[i])==0){
522
if(_85[i].length>_84.length){
523
_84=_85[i];
524
}
525
}
526
}
527
if(!_84){
528
_84="ROOT";
529
}
530
}
531
var _87=_81?_84:_82;
532
var _88=dojo.hostenv.findModule(_83);
533
var _89=null;
534
if(_88){
535
if(djConfig.localizationComplete&&_88._built){
536
return;
537
}
538
var _8a=_87.replace("-","_");
539
var _8b=_83+"."+_8a;
540
_89=dojo.hostenv.findModule(_8b);
541
}
542
if(!_89){
543
_88=dojo.hostenv.startPackage(_83);
544
var _8c=dojo.hostenv.getModuleSymbols(_7e);
545
var _8d=_8c.concat("nls").join("/");
546
var _8e;
547
dojo.hostenv.searchLocalePath(_87,_81,function(loc){
548
var _90=loc.replace("-","_");
549
var _91=_83+"."+_90;
550
var _92=false;
551
if(!dojo.hostenv.findModule(_91)){
552
dojo.hostenv.startPackage(_91);
553
var _93=[_8d];
554
if(loc!="ROOT"){
555
_93.push(loc);
556
}
557
_93.push(_7f);
558
var _94=_93.join("/")+".js";
559
_92=dojo.hostenv.loadPath(_94,null,function(_95){
560
var _96=function(){
561
};
562
_96.prototype=_8e;
563
_88[_90]=new _96();
564
for(var j in _95){
565
_88[_90][j]=_95[j];
566
}
567
});
568
}else{
569
_92=true;
570
}
571
if(_92&&_88[_90]){
572
_8e=_88[_90];
573
}else{
574
_88[_90]=_8e;
575
}
576
if(_81){
577
return true;
578
}
579
});
580
}
581
if(_81&&_82!=_84){
582
_88[_82.replace("-","_")]=_88[_84.replace("-","_")];
583
}
584
};
585
(function(){
586
var _98=djConfig.extraLocale;
587
if(_98){
588
if(!_98 instanceof Array){
589
_98=[_98];
590
}
591
var req=dojo.requireLocalization;
592
dojo.requireLocalization=function(m,b,_9c,_9d){
593
req(m,b,_9c,_9d);
594
if(_9c){
595
return;
596
}
597
for(var i=0;i<_98.length;i++){
598
req(m,b,_98[i],_9d);
599
}
600
};
601
}
602
})();
603
}
604
if(typeof window!="undefined"){
605
(function(){
606
if(djConfig.allowQueryConfig){
607
var _9f=document.location.toString();
608
var _a0=_9f.split("?",2);
609
if(_a0.length>1){
610
var _a1=_a0[1];
611
var _a2=_a1.split("&");
612
for(var x in _a2){
613
var sp=_a2[x].split("=");
614
if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){
615
var opt=sp[0].substr(9);
616
try{
617
djConfig[opt]=eval(sp[1]);
618
}
619
catch(e){
620
djConfig[opt]=sp[1];
621
}
622
}
623
}
624
}
625
}
626
if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){
627
var _a6=document.getElementsByTagName("script");
628
var _a7=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;
629
for(var i=0;i<_a6.length;i++){
630
var src=_a6[i].getAttribute("src");
631
if(!src){
632
continue;
633
}
634
var m=src.match(_a7);
635
if(m){
636
var _ab=src.substring(0,m.index);
637
if(src.indexOf("bootstrap1")>-1){
638
_ab+="../";
639
}
640
if(!this["djConfig"]){
641
djConfig={};
642
}
643
if(djConfig["baseScriptUri"]==""){
644
djConfig["baseScriptUri"]=_ab;
645
}
646
if(djConfig["baseRelativePath"]==""){
647
djConfig["baseRelativePath"]=_ab;
648
}
649
break;
650
}
651
}
652
}
653
var dr=dojo.render;
654
var drh=dojo.render.html;
655
var drs=dojo.render.svg;
656
var dua=(drh.UA=navigator.userAgent);
657
var dav=(drh.AV=navigator.appVersion);
658
var t=true;
659
var f=false;
660
drh.capable=t;
661
drh.support.builtin=t;
662
dr.ver=parseFloat(drh.AV);
663
dr.os.mac=dav.indexOf("Macintosh")>=0;
664
dr.os.win=dav.indexOf("Windows")>=0;
665
dr.os.linux=dav.indexOf("X11")>=0;
666
drh.opera=dua.indexOf("Opera")>=0;
667
drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0);
668
drh.safari=dav.indexOf("Safari")>=0;
669
var _b3=dua.indexOf("Gecko");
670
drh.mozilla=drh.moz=(_b3>=0)&&(!drh.khtml);
671
if(drh.mozilla){
672
drh.geckoVersion=dua.substring(_b3+6,_b3+14);
673
}
674
drh.ie=(document.all)&&(!drh.opera);
675
drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0;
676
drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0;
677
drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0;
678
drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0;
679
var cm=document["compatMode"];
680
drh.quirks=(cm=="BackCompat")||(cm=="QuirksMode")||drh.ie55||drh.ie50;
681
dojo.locale=dojo.locale||(drh.ie?navigator.userLanguage:navigator.language).toLowerCase();
682
dr.vml.capable=drh.ie;
683
drs.capable=f;
684
drs.support.plugin=f;
685
drs.support.builtin=f;
686
var _b5=window["document"];
687
var tdi=_b5["implementation"];
688
if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){
689
drs.capable=t;
690
drs.support.builtin=t;
691
drs.support.plugin=f;
692
}
693
if(drh.safari){
694
var tmp=dua.split("AppleWebKit/")[1];
695
var ver=parseFloat(tmp.split(" ")[0]);
696
if(ver>=420){
697
drs.capable=t;
698
drs.support.builtin=t;
699
drs.support.plugin=f;
700
}
701
}else{
702
}
703
})();
704
dojo.hostenv.startPackage("dojo.hostenv");
705
dojo.render.name=dojo.hostenv.name_="browser";
706
dojo.hostenv.searchIds=[];
707
dojo.hostenv._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
708
dojo.hostenv.getXmlhttpObject=function(){
709
var _b9=null;
710
var _ba=null;
711
try{
712
_b9=new XMLHttpRequest();
713
}
714
catch(e){
715
}
716
if(!_b9){
717
for(var i=0;i<3;++i){
718
var _bc=dojo.hostenv._XMLHTTP_PROGIDS[i];
719
try{
720
_b9=new ActiveXObject(_bc);
721
}
722
catch(e){
723
_ba=e;
724
}
725
if(_b9){
726
dojo.hostenv._XMLHTTP_PROGIDS=[_bc];
727
break;
728
}
729
}
730
}
731
if(!_b9){
732
return dojo.raise("XMLHTTP not available",_ba);
733
}
734
return _b9;
735
};
736
dojo.hostenv._blockAsync=false;
737
dojo.hostenv.getText=function(uri,_be,_bf){
738
if(!_be){
739
this._blockAsync=true;
740
}
741
var _c0=this.getXmlhttpObject();
742
function isDocumentOk(_c1){
743
var _c2=_c1["status"];
744
return Boolean((!_c2)||((200<=_c2)&&(300>_c2))||(_c2==304));
745
}
746
if(_be){
747
var _c3=this,_c4=null,gbl=dojo.global();
748
var xhr=dojo.evalObjPath("dojo.io.XMLHTTPTransport");
749
_c0.onreadystatechange=function(){
750
if(_c4){
751
gbl.clearTimeout(_c4);
752
_c4=null;
753
}
754
if(_c3._blockAsync||(xhr&&xhr._blockAsync)){
755
_c4=gbl.setTimeout(function(){
756
_c0.onreadystatechange.apply(this);
757
},10);
758
}else{
759
if(4==_c0.readyState){
760
if(isDocumentOk(_c0)){
761
_be(_c0.responseText);
762
}
763
}
764
}
765
};
766
}
767
_c0.open("GET",uri,_be?true:false);
768
try{
769
_c0.send(null);
770
if(_be){
771
return null;
772
}
773
if(!isDocumentOk(_c0)){
774
var err=Error("Unable to load "+uri+" status:"+_c0.status);
775
err.status=_c0.status;
776
err.responseText=_c0.responseText;
777
throw err;
778
}
779
}
780
catch(e){
781
this._blockAsync=false;
782
if((_bf)&&(!_be)){
783
return null;
784
}else{
785
throw e;
786
}
787
}
788
this._blockAsync=false;
789
return _c0.responseText;
790
};
791
dojo.hostenv.defaultDebugContainerId="dojoDebug";
792
dojo.hostenv._println_buffer=[];
793
dojo.hostenv._println_safe=false;
794
dojo.hostenv.println=function(_c8){
795
if(!dojo.hostenv._println_safe){
796
dojo.hostenv._println_buffer.push(_c8);
797
}else{
798
try{
799
var _c9=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);
800
if(!_c9){
801
_c9=dojo.body();
802
}
803
var div=document.createElement("div");
804
div.appendChild(document.createTextNode(_c8));
805
_c9.appendChild(div);
806
}
807
catch(e){
808
try{
809
document.write("<div>"+_c8+"</div>");
810
}
811
catch(e2){
812
window.status=_c8;
813
}
814
}
815
}
816
};
817
dojo.addOnLoad(function(){
818
dojo.hostenv._println_safe=true;
819
while(dojo.hostenv._println_buffer.length>0){
820
dojo.hostenv.println(dojo.hostenv._println_buffer.shift());
821
}
822
});
823
function dj_addNodeEvtHdlr(_cb,_cc,fp){
824
var _ce=_cb["on"+_cc]||function(){
825
};
826
_cb["on"+_cc]=function(){
827
fp.apply(_cb,arguments);
828
_ce.apply(_cb,arguments);
829
};
830
return true;
831
}
1422 alexandre_ 832
dojo.hostenv._djInitFired=false;
1318 alexandre_ 833
function dj_load_init(e){
1422 alexandre_ 834
dojo.hostenv._djInitFired=true;
1318 alexandre_ 835
var _d0=(e&&e.type)?e.type.toLowerCase():"load";
836
if(arguments.callee.initialized||(_d0!="domcontentloaded"&&_d0!="load")){
837
return;
838
}
839
arguments.callee.initialized=true;
840
if(typeof (_timer)!="undefined"){
841
clearInterval(_timer);
842
delete _timer;
843
}
844
var _d1=function(){
845
if(dojo.render.html.ie){
846
dojo.hostenv.makeWidgets();
847
}
848
};
849
if(dojo.hostenv.inFlightCount==0){
850
_d1();
851
dojo.hostenv.modulesLoaded();
852
}else{
853
dojo.hostenv.modulesLoadedListeners.unshift(_d1);
854
}
855
}
856
if(document.addEventListener){
857
if(dojo.render.html.opera||(dojo.render.html.moz&&(djConfig["enableMozDomContentLoaded"]===true))){
858
document.addEventListener("DOMContentLoaded",dj_load_init,null);
859
}
860
window.addEventListener("load",dj_load_init,null);
861
}
862
if(dojo.render.html.ie&&dojo.render.os.win){
863
document.attachEvent("onreadystatechange",function(e){
864
if(document.readyState=="complete"){
865
dj_load_init();
866
}
867
});
868
}
869
if(/(WebKit|khtml)/i.test(navigator.userAgent)){
870
var _timer=setInterval(function(){
871
if(/loaded|complete/.test(document.readyState)){
872
dj_load_init();
873
}
874
},10);
875
}
876
if(dojo.render.html.ie){
877
dj_addNodeEvtHdlr(window,"beforeunload",function(){
878
dojo.hostenv._unloading=true;
879
window.setTimeout(function(){
880
dojo.hostenv._unloading=false;
881
},0);
882
});
883
}
884
dj_addNodeEvtHdlr(window,"unload",function(){
885
dojo.hostenv.unloaded();
886
if((!dojo.render.html.ie)||(dojo.render.html.ie&&dojo.hostenv._unloading)){
887
dojo.hostenv.unloaded();
888
}
889
});
890
dojo.hostenv.makeWidgets=function(){
891
var _d3=[];
892
if(djConfig.searchIds&&djConfig.searchIds.length>0){
893
_d3=_d3.concat(djConfig.searchIds);
894
}
895
if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){
896
_d3=_d3.concat(dojo.hostenv.searchIds);
897
}
898
if((djConfig.parseWidgets)||(_d3.length>0)){
899
if(dojo.evalObjPath("dojo.widget.Parse")){
900
var _d4=new dojo.xml.Parse();
901
if(_d3.length>0){
902
for(var x=0;x<_d3.length;x++){
903
var _d6=document.getElementById(_d3[x]);
904
if(!_d6){
905
continue;
906
}
907
var _d7=_d4.parseElement(_d6,null,true);
908
dojo.widget.getParser().createComponents(_d7);
909
}
910
}else{
911
if(djConfig.parseWidgets){
912
var _d7=_d4.parseElement(dojo.body(),null,true);
913
dojo.widget.getParser().createComponents(_d7);
914
}
915
}
916
}
917
}
918
};
919
dojo.addOnLoad(function(){
920
if(!dojo.render.html.ie){
921
dojo.hostenv.makeWidgets();
922
}
923
});
924
try{
925
if(dojo.render.html.ie){
926
document.namespaces.add("v","urn:schemas-microsoft-com:vml");
927
document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");
928
}
929
}
930
catch(e){
931
}
932
dojo.hostenv.writeIncludes=function(){
933
};
934
if(!dj_undef("document",this)){
935
dj_currentDocument=this.document;
936
}
937
dojo.doc=function(){
938
return dj_currentDocument;
939
};
940
dojo.body=function(){
941
return dojo.doc().body||dojo.doc().getElementsByTagName("body")[0];
942
};
943
dojo.byId=function(id,doc){
944
if((id)&&((typeof id=="string")||(id instanceof String))){
945
if(!doc){
946
doc=dj_currentDocument;
947
}
948
var ele=doc.getElementById(id);
949
if(ele&&(ele.id!=id)&&doc.all){
950
ele=null;
951
eles=doc.all[id];
952
if(eles){
953
if(eles.length){
954
for(var i=0;i<eles.length;i++){
955
if(eles[i].id==id){
956
ele=eles[i];
957
break;
958
}
959
}
960
}else{
961
ele=eles;
962
}
963
}
964
}
965
return ele;
966
}
967
return id;
968
};
969
dojo.setContext=function(_dc,_dd){
970
dj_currentContext=_dc;
971
dj_currentDocument=_dd;
972
};
973
dojo._fireCallback=function(_de,_df,_e0){
974
if((_df)&&((typeof _de=="string")||(_de instanceof String))){
975
_de=_df[_de];
976
}
977
return (_df?_de.apply(_df,_e0||[]):_de());
978
};
979
dojo.withGlobal=function(_e1,_e2,_e3,_e4){
980
var _e5;
981
var _e6=dj_currentContext;
982
var _e7=dj_currentDocument;
983
try{
984
dojo.setContext(_e1,_e1.document);
985
_e5=dojo._fireCallback(_e2,_e3,_e4);
986
}
987
finally{
988
dojo.setContext(_e6,_e7);
989
}
990
return _e5;
991
};
992
dojo.withDoc=function(_e8,_e9,_ea,_eb){
993
var _ec;
994
var _ed=dj_currentDocument;
995
try{
996
dj_currentDocument=_e8;
997
_ec=dojo._fireCallback(_e9,_ea,_eb);
998
}
999
finally{
1000
dj_currentDocument=_ed;
1001
}
1002
return _ec;
1003
};
1004
}
1005
dojo.requireIf((djConfig["isDebug"]||djConfig["debugAtAllCosts"]),"dojo.debug");
1006
dojo.requireIf(djConfig["debugAtAllCosts"]&&!window.widget&&!djConfig["useXDomain"],"dojo.browser_debug");
1007
dojo.requireIf(djConfig["debugAtAllCosts"]&&!window.widget&&djConfig["useXDomain"],"dojo.browser_debug_xd");
1008
dojo.provide("dojo.string.common");
1009
dojo.string.trim=function(str,wh){
1010
if(!str.replace){
1011
return str;
1012
}
1013
if(!str.length){
1014
return str;
1015
}
1016
var re=(wh>0)?(/^\s+/):(wh<0)?(/\s+$/):(/^\s+|\s+$/g);
1017
return str.replace(re,"");
1018
};
1019
dojo.string.trimStart=function(str){
1020
return dojo.string.trim(str,1);
1021
};
1022
dojo.string.trimEnd=function(str){
1023
return dojo.string.trim(str,-1);
1024
};
1025
dojo.string.repeat=function(str,_f4,_f5){
1026
var out="";
1027
for(var i=0;i<_f4;i++){
1028
out+=str;
1029
if(_f5&&i<_f4-1){
1030
out+=_f5;
1031
}
1032
}
1033
return out;
1034
};
1035
dojo.string.pad=function(str,len,c,dir){
1036
var out=String(str);
1037
if(!c){
1038
c="0";
1039
}
1040
if(!dir){
1041
dir=1;
1042
}
1043
while(out.length<len){
1044
if(dir>0){
1045
out=c+out;
1046
}else{
1047
out+=c;
1048
}
1049
}
1050
return out;
1051
};
1052
dojo.string.padLeft=function(str,len,c){
1053
return dojo.string.pad(str,len,c,1);
1054
};
1055
dojo.string.padRight=function(str,len,c){
1056
return dojo.string.pad(str,len,c,-1);
1057
};
1058
dojo.provide("dojo.string");
1059
dojo.provide("dojo.lang.common");
1060
dojo.lang.inherits=function(_103,_104){
1061
if(!dojo.lang.isFunction(_104)){
1062
dojo.raise("dojo.inherits: superclass argument ["+_104+"] must be a function (subclass: ["+_103+"']");
1063
}
1064
_103.prototype=new _104();
1065
_103.prototype.constructor=_103;
1066
_103.superclass=_104.prototype;
1067
_103["super"]=_104.prototype;
1068
};
1069
dojo.lang._mixin=function(obj,_106){
1070
var tobj={};
1071
for(var x in _106){
1072
if((typeof tobj[x]=="undefined")||(tobj[x]!=_106[x])){
1073
obj[x]=_106[x];
1074
}
1075
}
1076
if(dojo.render.html.ie&&(typeof (_106["toString"])=="function")&&(_106["toString"]!=obj["toString"])&&(_106["toString"]!=tobj["toString"])){
1077
obj.toString=_106.toString;
1078
}
1079
return obj;
1080
};
1081
dojo.lang.mixin=function(obj,_10a){
1082
for(var i=1,l=arguments.length;i<l;i++){
1083
dojo.lang._mixin(obj,arguments[i]);
1084
}
1085
return obj;
1086
};
1087
dojo.lang.extend=function(_10d,_10e){
1088
for(var i=1,l=arguments.length;i<l;i++){
1089
dojo.lang._mixin(_10d.prototype,arguments[i]);
1090
}
1091
return _10d;
1092
};
1093
dojo.inherits=dojo.lang.inherits;
1094
dojo.mixin=dojo.lang.mixin;
1095
dojo.extend=dojo.lang.extend;
1096
dojo.lang.find=function(_111,_112,_113,_114){
1097
if(!dojo.lang.isArrayLike(_111)&&dojo.lang.isArrayLike(_112)){
1098
dojo.deprecated("dojo.lang.find(value, array)","use dojo.lang.find(array, value) instead","0.5");
1099
var temp=_111;
1100
_111=_112;
1101
_112=temp;
1102
}
1103
var _116=dojo.lang.isString(_111);
1104
if(_116){
1105
_111=_111.split("");
1106
}
1107
if(_114){
1108
var step=-1;
1109
var i=_111.length-1;
1110
var end=-1;
1111
}else{
1112
var step=1;
1113
var i=0;
1114
var end=_111.length;
1115
}
1116
if(_113){
1117
while(i!=end){
1118
if(_111[i]===_112){
1119
return i;
1120
}
1121
i+=step;
1122
}
1123
}else{
1124
while(i!=end){
1125
if(_111[i]==_112){
1126
return i;
1127
}
1128
i+=step;
1129
}
1130
}
1131
return -1;
1132
};
1133
dojo.lang.indexOf=dojo.lang.find;
1134
dojo.lang.findLast=function(_11a,_11b,_11c){
1135
return dojo.lang.find(_11a,_11b,_11c,true);
1136
};
1137
dojo.lang.lastIndexOf=dojo.lang.findLast;
1138
dojo.lang.inArray=function(_11d,_11e){
1139
return dojo.lang.find(_11d,_11e)>-1;
1140
};
1141
dojo.lang.isObject=function(it){
1142
if(typeof it=="undefined"){
1143
return false;
1144
}
1145
return (typeof it=="object"||it===null||dojo.lang.isArray(it)||dojo.lang.isFunction(it));
1146
};
1147
dojo.lang.isArray=function(it){
1148
return (it&&it instanceof Array||typeof it=="array");
1149
};
1150
dojo.lang.isArrayLike=function(it){
1151
if((!it)||(dojo.lang.isUndefined(it))){
1152
return false;
1153
}
1154
if(dojo.lang.isString(it)){
1155
return false;
1156
}
1157
if(dojo.lang.isFunction(it)){
1158
return false;
1159
}
1160
if(dojo.lang.isArray(it)){
1161
return true;
1162
}
1163
if((it.tagName)&&(it.tagName.toLowerCase()=="form")){
1164
return false;
1165
}
1166
if(dojo.lang.isNumber(it.length)&&isFinite(it.length)){
1167
return true;
1168
}
1169
return false;
1170
};
1171
dojo.lang.isFunction=function(it){
1172
return (it instanceof Function||typeof it=="function");
1173
};
1174
(function(){
1175
if((dojo.render.html.capable)&&(dojo.render.html["safari"])){
1176
dojo.lang.isFunction=function(it){
1177
if((typeof (it)=="function")&&(it=="[object NodeList]")){
1178
return false;
1179
}
1180
return (it instanceof Function||typeof it=="function");
1181
};
1182
}
1183
})();
1184
dojo.lang.isString=function(it){
1185
return (typeof it=="string"||it instanceof String);
1186
};
1187
dojo.lang.isAlien=function(it){
1188
if(!it){
1189
return false;
1190
}
1191
return !dojo.lang.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));
1192
};
1193
dojo.lang.isBoolean=function(it){
1194
return (it instanceof Boolean||typeof it=="boolean");
1195
};
1196
dojo.lang.isNumber=function(it){
1197
return (it instanceof Number||typeof it=="number");
1198
};
1199
dojo.lang.isUndefined=function(it){
1200
return ((typeof (it)=="undefined")&&(it==undefined));
1201
};
1202
dojo.provide("dojo.lang.extras");
1203
dojo.lang.setTimeout=function(func,_12a){
1204
var _12b=window,_12c=2;
1205
if(!dojo.lang.isFunction(func)){
1206
_12b=func;
1207
func=_12a;
1208
_12a=arguments[2];
1209
_12c++;
1210
}
1211
if(dojo.lang.isString(func)){
1212
func=_12b[func];
1213
}
1214
var args=[];
1215
for(var i=_12c;i<arguments.length;i++){
1216
args.push(arguments[i]);
1217
}
1218
return dojo.global().setTimeout(function(){
1219
func.apply(_12b,args);
1220
},_12a);
1221
};
1222
dojo.lang.clearTimeout=function(_12f){
1223
dojo.global().clearTimeout(_12f);
1224
};
1225
dojo.lang.getNameInObj=function(ns,item){
1226
if(!ns){
1227
ns=dj_global;
1228
}
1229
for(var x in ns){
1230
if(ns[x]===item){
1231
return new String(x);
1232
}
1233
}
1234
return null;
1235
};
1236
dojo.lang.shallowCopy=function(obj,deep){
1237
var i,ret;
1238
if(obj===null){
1239
return null;
1240
}
1241
if(dojo.lang.isObject(obj)){
1242
ret=new obj.constructor();
1243
for(i in obj){
1244
if(dojo.lang.isUndefined(ret[i])){
1245
ret[i]=deep?dojo.lang.shallowCopy(obj[i],deep):obj[i];
1246
}
1247
}
1248
}else{
1249
if(dojo.lang.isArray(obj)){
1250
ret=[];
1251
for(i=0;i<obj.length;i++){
1252
ret[i]=deep?dojo.lang.shallowCopy(obj[i],deep):obj[i];
1253
}
1254
}else{
1255
ret=obj;
1256
}
1257
}
1258
return ret;
1259
};
1260
dojo.lang.firstValued=function(){
1261
for(var i=0;i<arguments.length;i++){
1262
if(typeof arguments[i]!="undefined"){
1263
return arguments[i];
1264
}
1265
}
1266
return undefined;
1267
};
1268
dojo.lang.getObjPathValue=function(_138,_139,_13a){
1269
with(dojo.parseObjPath(_138,_139,_13a)){
1270
return dojo.evalProp(prop,obj,_13a);
1271
}
1272
};
1273
dojo.lang.setObjPathValue=function(_13b,_13c,_13d,_13e){
1274
dojo.deprecated("dojo.lang.setObjPathValue","use dojo.parseObjPath and the '=' operator","0.6");
1275
if(arguments.length<4){
1276
_13e=true;
1277
}
1278
with(dojo.parseObjPath(_13b,_13d,_13e)){
1279
if(obj&&(_13e||(prop in obj))){
1280
obj[prop]=_13c;
1281
}
1282
}
1283
};
1284
dojo.provide("dojo.io.common");
1285
dojo.io.transports=[];
1286
dojo.io.hdlrFuncNames=["load","error","timeout"];
1287
dojo.io.Request=function(url,_140,_141,_142){
1288
if((arguments.length==1)&&(arguments[0].constructor==Object)){
1289
this.fromKwArgs(arguments[0]);
1290
}else{
1291
this.url=url;
1292
if(_140){
1293
this.mimetype=_140;
1294
}
1295
if(_141){
1296
this.transport=_141;
1297
}
1298
if(arguments.length>=4){
1299
this.changeUrl=_142;
1300
}
1301
}
1302
};
1422 alexandre_ 1303
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){
1304
if((this.mimetype=="text/json-comment-filtered")||(this.mimetype=="application/json-comment-filtered")){
1305
var _144=_143.indexOf("/*");
1306
var _145=_143.lastIndexOf("*/");
1307
if((_144==-1)||(_145==-1)){
1308
dojo.debug("your JSON wasn't comment filtered!");
1309
return "";
1310
}
1311
return _143.substring(_144+2,_145);
1312
}
1313
dojo.debug("please consider using a mimetype of text/json-comment-filtered to avoid potential security issues with JSON endpoints");
1314
return _143;
1315
},load:function(type,data,_148,_149){
1316
},error:function(type,_14b,_14c,_14d){
1317
},timeout:function(type,_14f,_150,_151){
1318
},handle:function(type,data,_154,_155){
1318 alexandre_ 1319
},timeoutSeconds:0,abort:function(){
1422 alexandre_ 1320
},fromKwArgs:function(_156){
1321
if(_156["url"]){
1322
_156.url=_156.url.toString();
1318 alexandre_ 1323
}
1422 alexandre_ 1324
if(_156["formNode"]){
1325
_156.formNode=dojo.byId(_156.formNode);
1318 alexandre_ 1326
}
1422 alexandre_ 1327
if(!_156["method"]&&_156["formNode"]&&_156["formNode"].method){
1328
_156.method=_156["formNode"].method;
1318 alexandre_ 1329
}
1422 alexandre_ 1330
if(!_156["handle"]&&_156["handler"]){
1331
_156.handle=_156.handler;
1318 alexandre_ 1332
}
1422 alexandre_ 1333
if(!_156["load"]&&_156["loaded"]){
1334
_156.load=_156.loaded;
1318 alexandre_ 1335
}
1422 alexandre_ 1336
if(!_156["changeUrl"]&&_156["changeURL"]){
1337
_156.changeUrl=_156.changeURL;
1318 alexandre_ 1338
}
1422 alexandre_ 1339
_156.encoding=dojo.lang.firstValued(_156["encoding"],djConfig["bindEncoding"],"");
1340
_156.sendTransport=dojo.lang.firstValued(_156["sendTransport"],djConfig["ioSendTransport"],false);
1341
var _157=dojo.lang.isFunction;
1318 alexandre_ 1342
for(var x=0;x<dojo.io.hdlrFuncNames.length;x++){
1343
var fn=dojo.io.hdlrFuncNames[x];
1422 alexandre_ 1344
if(_156[fn]&&_157(_156[fn])){
1318 alexandre_ 1345
continue;
1346
}
1422 alexandre_ 1347
if(_156["handle"]&&_157(_156["handle"])){
1348
_156[fn]=_156.handle;
1318 alexandre_ 1349
}
1350
}
1422 alexandre_ 1351
dojo.lang.mixin(this,_156);
1318 alexandre_ 1352
}});
1353
dojo.io.Error=function(msg,type,num){
1354
this.message=msg;
1355
this.type=type||"unknown";
1356
this.number=num||0;
1357
};
1358
dojo.io.transports.addTransport=function(name){
1359
this.push(name);
1360
this[name]=dojo.io[name];
1361
};
1422 alexandre_ 1362
dojo.io.bind=function(_15e){
1363
if(!(_15e instanceof dojo.io.Request)){
1318 alexandre_ 1364
try{
1422 alexandre_ 1365
_15e=new dojo.io.Request(_15e);
1318 alexandre_ 1366
}
1367
catch(e){
1368
dojo.debug(e);
1369
}
1370
}
1422 alexandre_ 1371
var _15f="";
1372
if(_15e["transport"]){
1373
_15f=_15e["transport"];
1374
if(!this[_15f]){
1375
dojo.io.sendBindError(_15e,"No dojo.io.bind() transport with name '"+_15e["transport"]+"'.");
1376
return _15e;
1318 alexandre_ 1377
}
1422 alexandre_ 1378
if(!this[_15f].canHandle(_15e)){
1379
dojo.io.sendBindError(_15e,"dojo.io.bind() transport with name '"+_15e["transport"]+"' cannot handle this type of request.");
1380
return _15e;
1318 alexandre_ 1381
}
1382
}else{
1383
for(var x=0;x<dojo.io.transports.length;x++){
1384
var tmp=dojo.io.transports[x];
1422 alexandre_ 1385
if((this[tmp])&&(this[tmp].canHandle(_15e))){
1386
_15f=tmp;
1318 alexandre_ 1387
break;
1388
}
1389
}
1422 alexandre_ 1390
if(_15f==""){
1391
dojo.io.sendBindError(_15e,"None of the loaded transports for dojo.io.bind()"+" can handle the request.");
1392
return _15e;
1318 alexandre_ 1393
}
1394
}
1422 alexandre_ 1395
this[_15f].bind(_15e);
1396
_15e.bindSuccess=true;
1397
return _15e;
1318 alexandre_ 1398
};
1422 alexandre_ 1399
dojo.io.sendBindError=function(_162,_163){
1400
if((typeof _162.error=="function"||typeof _162.handle=="function")&&(typeof setTimeout=="function"||typeof setTimeout=="object")){
1401
var _164=new dojo.io.Error(_163);
1318 alexandre_ 1402
setTimeout(function(){
1422 alexandre_ 1403
_162[(typeof _162.error=="function")?"error":"handle"]("error",_164,null,_162);
1318 alexandre_ 1404
},50);
1405
}else{
1422 alexandre_ 1406
dojo.raise(_163);
1318 alexandre_ 1407
}
1408
};
1422 alexandre_ 1409
dojo.io.queueBind=function(_165){
1410
if(!(_165 instanceof dojo.io.Request)){
1318 alexandre_ 1411
try{
1422 alexandre_ 1412
_165=new dojo.io.Request(_165);
1318 alexandre_ 1413
}
1414
catch(e){
1415
dojo.debug(e);
1416
}
1417
}
1422 alexandre_ 1418
var _166=_165.load;
1419
_165.load=function(){
1318 alexandre_ 1420
dojo.io._queueBindInFlight=false;
1422 alexandre_ 1421
var ret=_166.apply(this,arguments);
1318 alexandre_ 1422
dojo.io._dispatchNextQueueBind();
1423
return ret;
1424
};
1422 alexandre_ 1425
var _168=_165.error;
1426
_165.error=function(){
1318 alexandre_ 1427
dojo.io._queueBindInFlight=false;
1422 alexandre_ 1428
var ret=_168.apply(this,arguments);
1318 alexandre_ 1429
dojo.io._dispatchNextQueueBind();
1430
return ret;
1431
};
1422 alexandre_ 1432
dojo.io._bindQueue.push(_165);
1318 alexandre_ 1433
dojo.io._dispatchNextQueueBind();
1422 alexandre_ 1434
return _165;
1318 alexandre_ 1435
};
1436
dojo.io._dispatchNextQueueBind=function(){
1437
if(!dojo.io._queueBindInFlight){
1438
dojo.io._queueBindInFlight=true;
1439
if(dojo.io._bindQueue.length>0){
1440
dojo.io.bind(dojo.io._bindQueue.shift());
1441
}else{
1442
dojo.io._queueBindInFlight=false;
1443
}
1444
}
1445
};
1446
dojo.io._bindQueue=[];
1447
dojo.io._queueBindInFlight=false;
1422 alexandre_ 1448
dojo.io.argsFromMap=function(map,_16b,last){
1449
var enc=/utf/i.test(_16b||"")?encodeURIComponent:dojo.string.encodeAscii;
1450
var _16e=[];
1451
var _16f=new Object();
1318 alexandre_ 1452
for(var name in map){
1422 alexandre_ 1453
var _171=function(elt){
1318 alexandre_ 1454
var val=enc(name)+"="+enc(elt);
1422 alexandre_ 1455
_16e[(last==name)?"push":"unshift"](val);
1318 alexandre_ 1456
};
1422 alexandre_ 1457
if(!_16f[name]){
1458
var _174=map[name];
1459
if(dojo.lang.isArray(_174)){
1460
dojo.lang.forEach(_174,_171);
1318 alexandre_ 1461
}else{
1422 alexandre_ 1462
_171(_174);
1318 alexandre_ 1463
}
1464
}
1465
}
1422 alexandre_ 1466
return _16e.join("&");
1318 alexandre_ 1467
};
1422 alexandre_ 1468
dojo.io.setIFrameSrc=function(_175,src,_177){
1318 alexandre_ 1469
try{
1470
var r=dojo.render.html;
1422 alexandre_ 1471
if(!_177){
1318 alexandre_ 1472
if(r.safari){
1422 alexandre_ 1473
_175.location=src;
1318 alexandre_ 1474
}else{
1422 alexandre_ 1475
frames[_175.name].location=src;
1318 alexandre_ 1476
}
1477
}else{
1478
var idoc;
1479
if(r.ie){
1422 alexandre_ 1480
idoc=_175.contentWindow.document;
1318 alexandre_ 1481
}else{
1482
if(r.safari){
1422 alexandre_ 1483
idoc=_175.document;
1318 alexandre_ 1484
}else{
1422 alexandre_ 1485
idoc=_175.contentWindow;
1318 alexandre_ 1486
}
1487
}
1488
if(!idoc){
1422 alexandre_ 1489
_175.location=src;
1318 alexandre_ 1490
return;
1491
}else{
1492
idoc.location.replace(src);
1493
}
1494
}
1495
}
1496
catch(e){
1497
dojo.debug(e);
1498
dojo.debug("setIFrameSrc: "+e);
1499
}
1500
};
1501
dojo.provide("dojo.lang.array");
1502
dojo.lang.mixin(dojo.lang,{has:function(obj,name){
1503
try{
1504
return typeof obj[name]!="undefined";
1505
}
1506
catch(e){
1507
return false;
1508
}
1509
},isEmpty:function(obj){
1510
if(dojo.lang.isObject(obj)){
1511
var tmp={};
1422 alexandre_ 1512
var _17e=0;
1318 alexandre_ 1513
for(var x in obj){
1514
if(obj[x]&&(!tmp[x])){
1422 alexandre_ 1515
_17e++;
1318 alexandre_ 1516
break;
1517
}
1518
}
1422 alexandre_ 1519
return _17e==0;
1318 alexandre_ 1520
}else{
1521
if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){
1522
return obj.length==0;
1523
}
1524
}
1422 alexandre_ 1525
},map:function(arr,obj,_182){
1526
var _183=dojo.lang.isString(arr);
1527
if(_183){
1318 alexandre_ 1528
arr=arr.split("");
1529
}
1422 alexandre_ 1530
if(dojo.lang.isFunction(obj)&&(!_182)){
1531
_182=obj;
1318 alexandre_ 1532
obj=dj_global;
1533
}else{
1422 alexandre_ 1534
if(dojo.lang.isFunction(obj)&&_182){
1535
var _184=obj;
1536
obj=_182;
1537
_182=_184;
1318 alexandre_ 1538
}
1539
}
1540
if(Array.map){
1422 alexandre_ 1541
var _185=Array.map(arr,_182,obj);
1318 alexandre_ 1542
}else{
1422 alexandre_ 1543
var _185=[];
1318 alexandre_ 1544
for(var i=0;i<arr.length;++i){
1422 alexandre_ 1545
_185.push(_182.call(obj,arr[i]));
1318 alexandre_ 1546
}
1547
}
1422 alexandre_ 1548
if(_183){
1549
return _185.join("");
1318 alexandre_ 1550
}else{
1422 alexandre_ 1551
return _185;
1318 alexandre_ 1552
}
1422 alexandre_ 1553
},reduce:function(arr,_188,obj,_18a){
1554
var _18b=_188;
1318 alexandre_ 1555
if(arguments.length==2){
1422 alexandre_ 1556
_18a=_188;
1557
_18b=arr[0];
1318 alexandre_ 1558
arr=arr.slice(1);
1559
}else{
1560
if(arguments.length==3){
1561
if(dojo.lang.isFunction(obj)){
1422 alexandre_ 1562
_18a=obj;
1318 alexandre_ 1563
obj=null;
1564
}
1565
}else{
1566
if(dojo.lang.isFunction(obj)){
1422 alexandre_ 1567
var tmp=_18a;
1568
_18a=obj;
1318 alexandre_ 1569
obj=tmp;
1570
}
1571
}
1572
}
1573
var ob=obj||dj_global;
1574
dojo.lang.map(arr,function(val){
1422 alexandre_ 1575
_18b=_18a.call(ob,_18b,val);
1318 alexandre_ 1576
});
1422 alexandre_ 1577
return _18b;
1578
},forEach:function(_18f,_190,_191){
1579
if(dojo.lang.isString(_18f)){
1580
_18f=_18f.split("");
1318 alexandre_ 1581
}
1582
if(Array.forEach){
1422 alexandre_ 1583
Array.forEach(_18f,_190,_191);
1318 alexandre_ 1584
}else{
1422 alexandre_ 1585
if(!_191){
1586
_191=dj_global;
1318 alexandre_ 1587
}
1422 alexandre_ 1588
for(var i=0,l=_18f.length;i<l;i++){
1589
_190.call(_191,_18f[i],i,_18f);
1318 alexandre_ 1590
}
1591
}
1422 alexandre_ 1592
},_everyOrSome:function(_194,arr,_196,_197){
1318 alexandre_ 1593
if(dojo.lang.isString(arr)){
1594
arr=arr.split("");
1595
}
1596
if(Array.every){
1422 alexandre_ 1597
return Array[_194?"every":"some"](arr,_196,_197);
1318 alexandre_ 1598
}else{
1422 alexandre_ 1599
if(!_197){
1600
_197=dj_global;
1318 alexandre_ 1601
}
1602
for(var i=0,l=arr.length;i<l;i++){
1422 alexandre_ 1603
var _19a=_196.call(_197,arr[i],i,arr);
1604
if(_194&&!_19a){
1318 alexandre_ 1605
return false;
1606
}else{
1422 alexandre_ 1607
if((!_194)&&(_19a)){
1318 alexandre_ 1608
return true;
1609
}
1610
}
1611
}
1422 alexandre_ 1612
return Boolean(_194);
1318 alexandre_ 1613
}
1422 alexandre_ 1614
},every:function(arr,_19c,_19d){
1615
return this._everyOrSome(true,arr,_19c,_19d);
1616
},some:function(arr,_19f,_1a0){
1617
return this._everyOrSome(false,arr,_19f,_1a0);
1618
},filter:function(arr,_1a2,_1a3){
1619
var _1a4=dojo.lang.isString(arr);
1620
if(_1a4){
1318 alexandre_ 1621
arr=arr.split("");
1622
}
1422 alexandre_ 1623
var _1a5;
1318 alexandre_ 1624
if(Array.filter){
1422 alexandre_ 1625
_1a5=Array.filter(arr,_1a2,_1a3);
1318 alexandre_ 1626
}else{
1422 alexandre_ 1627
if(!_1a3){
1318 alexandre_ 1628
if(arguments.length>=3){
1629
dojo.raise("thisObject doesn't exist!");
1630
}
1422 alexandre_ 1631
_1a3=dj_global;
1318 alexandre_ 1632
}
1422 alexandre_ 1633
_1a5=[];
1318 alexandre_ 1634
for(var i=0;i<arr.length;i++){
1422 alexandre_ 1635
if(_1a2.call(_1a3,arr[i],i,arr)){
1636
_1a5.push(arr[i]);
1318 alexandre_ 1637
}
1638
}
1639
}
1422 alexandre_ 1640
if(_1a4){
1641
return _1a5.join("");
1318 alexandre_ 1642
}else{
1422 alexandre_ 1643
return _1a5;
1318 alexandre_ 1644
}
1645
},unnest:function(){
1646
var out=[];
1647
for(var i=0;i<arguments.length;i++){
1648
if(dojo.lang.isArrayLike(arguments[i])){
1649
var add=dojo.lang.unnest.apply(this,arguments[i]);
1650
out=out.concat(add);
1651
}else{
1652
out.push(arguments[i]);
1653
}
1654
}
1655
return out;
1422 alexandre_ 1656
},toArray:function(_1aa,_1ab){
1657
var _1ac=[];
1658
for(var i=_1ab||0;i<_1aa.length;i++){
1659
_1ac.push(_1aa[i]);
1318 alexandre_ 1660
}
1422 alexandre_ 1661
return _1ac;
1318 alexandre_ 1662
}});
1663
dojo.provide("dojo.lang.func");
1422 alexandre_ 1664
dojo.lang.hitch=function(_1ae,_1af){
1665
var args=[];
1666
for(var x=2;x<arguments.length;x++){
1667
args.push(arguments[x]);
1668
}
1669
var fcn=(dojo.lang.isString(_1af)?_1ae[_1af]:_1af)||function(){
1318 alexandre_ 1670
};
1671
return function(){
1422 alexandre_ 1672
var ta=args.concat([]);
1673
for(var x=0;x<arguments.length;x++){
1674
ta.push(arguments[x]);
1675
}
1676
return fcn.apply(_1ae,ta);
1318 alexandre_ 1677
};
1678
};
1679
dojo.lang.anonCtr=0;
1680
dojo.lang.anon={};
1422 alexandre_ 1681
dojo.lang.nameAnonFunc=function(_1b5,_1b6,_1b7){
1682
var nso=(_1b6||dojo.lang.anon);
1683
if((_1b7)||((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"]==true))){
1318 alexandre_ 1684
for(var x in nso){
1685
try{
1422 alexandre_ 1686
if(nso[x]===_1b5){
1318 alexandre_ 1687
return x;
1688
}
1689
}
1690
catch(e){
1691
}
1692
}
1693
}
1694
var ret="__"+dojo.lang.anonCtr++;
1695
while(typeof nso[ret]!="undefined"){
1696
ret="__"+dojo.lang.anonCtr++;
1697
}
1422 alexandre_ 1698
nso[ret]=_1b5;
1318 alexandre_ 1699
return ret;
1700
};
1422 alexandre_ 1701
dojo.lang.forward=function(_1bb){
1318 alexandre_ 1702
return function(){
1422 alexandre_ 1703
return this[_1bb].apply(this,arguments);
1318 alexandre_ 1704
};
1705
};
1422 alexandre_ 1706
dojo.lang.curry=function(_1bc,func){
1707
var _1be=[];
1708
_1bc=_1bc||dj_global;
1318 alexandre_ 1709
if(dojo.lang.isString(func)){
1422 alexandre_ 1710
func=_1bc[func];
1318 alexandre_ 1711
}
1712
for(var x=2;x<arguments.length;x++){
1422 alexandre_ 1713
_1be.push(arguments[x]);
1318 alexandre_ 1714
}
1422 alexandre_ 1715
var _1c0=(func["__preJoinArity"]||func.length)-_1be.length;
1716
function gather(_1c1,_1c2,_1c3){
1717
var _1c4=_1c3;
1718
var _1c5=_1c2.slice(0);
1719
for(var x=0;x<_1c1.length;x++){
1720
_1c5.push(_1c1[x]);
1318 alexandre_ 1721
}
1422 alexandre_ 1722
_1c3=_1c3-_1c1.length;
1723
if(_1c3<=0){
1724
var res=func.apply(_1bc,_1c5);
1725
_1c3=_1c4;
1318 alexandre_ 1726
return res;
1727
}else{
1728
return function(){
1422 alexandre_ 1729
return gather(arguments,_1c5,_1c3);
1318 alexandre_ 1730
};
1731
}
1732
}
1422 alexandre_ 1733
return gather([],_1be,_1c0);
1318 alexandre_ 1734
};
1422 alexandre_ 1735
dojo.lang.curryArguments=function(_1c8,func,args,_1cb){
1736
var _1cc=[];
1737
var x=_1cb||0;
1738
for(x=_1cb;x<args.length;x++){
1739
_1cc.push(args[x]);
1318 alexandre_ 1740
}
1422 alexandre_ 1741
return dojo.lang.curry.apply(dojo.lang,[_1c8,func].concat(_1cc));
1318 alexandre_ 1742
};
1743
dojo.lang.tryThese=function(){
1744
for(var x=0;x<arguments.length;x++){
1745
try{
1746
if(typeof arguments[x]=="function"){
1747
var ret=(arguments[x]());
1748
if(ret){
1749
return ret;
1750
}
1751
}
1752
}
1753
catch(e){
1754
dojo.debug(e);
1755
}
1756
}
1757
};
1422 alexandre_ 1758
dojo.lang.delayThese=function(farr,cb,_1d2,_1d3){
1318 alexandre_ 1759
if(!farr.length){
1422 alexandre_ 1760
if(typeof _1d3=="function"){
1761
_1d3();
1318 alexandre_ 1762
}
1763
return;
1764
}
1422 alexandre_ 1765
if((typeof _1d2=="undefined")&&(typeof cb=="number")){
1766
_1d2=cb;
1318 alexandre_ 1767
cb=function(){
1768
};
1769
}else{
1770
if(!cb){
1771
cb=function(){
1772
};
1422 alexandre_ 1773
if(!_1d2){
1774
_1d2=0;
1318 alexandre_ 1775
}
1776
}
1777
}
1778
setTimeout(function(){
1779
(farr.shift())();
1780
cb();
1422 alexandre_ 1781
dojo.lang.delayThese(farr,cb,_1d2,_1d3);
1782
},_1d2);
1318 alexandre_ 1783
};
1784
dojo.provide("dojo.string.extras");
1422 alexandre_ 1785
dojo.string.substituteParams=function(_1d4,hash){
1318 alexandre_ 1786
var map=(typeof hash=="object")?hash:dojo.lang.toArray(arguments,1);
1422 alexandre_ 1787
return _1d4.replace(/\%\{(\w+)\}/g,function(_1d7,key){
1318 alexandre_ 1788
if(typeof (map[key])!="undefined"&&map[key]!=null){
1789
return map[key];
1790
}
1791
dojo.raise("Substitution not found: "+key);
1792
});
1793
};
1794
dojo.string.capitalize=function(str){
1795
if(!dojo.lang.isString(str)){
1796
return "";
1797
}
1798
if(arguments.length==0){
1799
str=this;
1800
}
1422 alexandre_ 1801
var _1da=str.split(" ");
1802
for(var i=0;i<_1da.length;i++){
1803
_1da[i]=_1da[i].charAt(0).toUpperCase()+_1da[i].substring(1);
1318 alexandre_ 1804
}
1422 alexandre_ 1805
return _1da.join(" ");
1318 alexandre_ 1806
};
1807
dojo.string.isBlank=function(str){
1808
if(!dojo.lang.isString(str)){
1809
return true;
1810
}
1811
return (dojo.string.trim(str).length==0);
1812
};
1813
dojo.string.encodeAscii=function(str){
1814
if(!dojo.lang.isString(str)){
1815
return str;
1816
}
1817
var ret="";
1422 alexandre_ 1818
var _1df=escape(str);
1819
var _1e0,re=/%u([0-9A-F]{4})/i;
1820
while((_1e0=_1df.match(re))){
1821
var num=Number("0x"+_1e0[1]);
1822
var _1e3=escape("&#"+num+";");
1823
ret+=_1df.substring(0,_1e0.index)+_1e3;
1824
_1df=_1df.substring(_1e0.index+_1e0[0].length);
1318 alexandre_ 1825
}
1422 alexandre_ 1826
ret+=_1df.replace(/\+/g,"%2B");
1318 alexandre_ 1827
return ret;
1828
};
1829
dojo.string.escape=function(type,str){
1830
var args=dojo.lang.toArray(arguments,1);
1831
switch(type.toLowerCase()){
1832
case "xml":
1833
case "html":
1834
case "xhtml":
1835
return dojo.string.escapeXml.apply(this,args);
1836
case "sql":
1837
return dojo.string.escapeSql.apply(this,args);
1838
case "regexp":
1839
case "regex":
1840
return dojo.string.escapeRegExp.apply(this,args);
1841
case "javascript":
1842
case "jscript":
1843
case "js":
1844
return dojo.string.escapeJavaScript.apply(this,args);
1845
case "ascii":
1846
return dojo.string.encodeAscii.apply(this,args);
1847
default:
1848
return str;
1849
}
1850
};
1422 alexandre_ 1851
dojo.string.escapeXml=function(str,_1e8){
1318 alexandre_ 1852
str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
1422 alexandre_ 1853
if(!_1e8){
1318 alexandre_ 1854
str=str.replace(/'/gm,"&#39;");
1855
}
1856
return str;
1857
};
1858
dojo.string.escapeSql=function(str){
1859
return str.replace(/'/gm,"''");
1860
};
1861
dojo.string.escapeRegExp=function(str){
1862
return str.replace(/\\/gm,"\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm,"\\$1");
1863
};
1864
dojo.string.escapeJavaScript=function(str){
1865
return str.replace(/(["'\f\b\n\t\r])/gm,"\\$1");
1866
};
1867
dojo.string.escapeString=function(str){
1868
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");
1869
};
1870
dojo.string.summary=function(str,len){
1871
if(!len||str.length<=len){
1872
return str;
1873
}
1874
return str.substring(0,len).replace(/\.+$/,"")+"...";
1875
};
1422 alexandre_ 1876
dojo.string.endsWith=function(str,end,_1f1){
1877
if(_1f1){
1318 alexandre_ 1878
str=str.toLowerCase();
1879
end=end.toLowerCase();
1880
}
1881
if((str.length-end.length)<0){
1882
return false;
1883
}
1884
return str.lastIndexOf(end)==str.length-end.length;
1885
};
1886
dojo.string.endsWithAny=function(str){
1887
for(var i=1;i<arguments.length;i++){
1888
if(dojo.string.endsWith(str,arguments[i])){
1889
return true;
1890
}
1891
}
1892
return false;
1893
};
1422 alexandre_ 1894
dojo.string.startsWith=function(str,_1f5,_1f6){
1895
if(_1f6){
1318 alexandre_ 1896
str=str.toLowerCase();
1422 alexandre_ 1897
_1f5=_1f5.toLowerCase();
1318 alexandre_ 1898
}
1422 alexandre_ 1899
return str.indexOf(_1f5)==0;
1318 alexandre_ 1900
};
1901
dojo.string.startsWithAny=function(str){
1902
for(var i=1;i<arguments.length;i++){
1903
if(dojo.string.startsWith(str,arguments[i])){
1904
return true;
1905
}
1906
}
1907
return false;
1908
};
1909
dojo.string.has=function(str){
1910
for(var i=1;i<arguments.length;i++){
1911
if(str.indexOf(arguments[i])>-1){
1912
return true;
1913
}
1914
}
1915
return false;
1916
};
1422 alexandre_ 1917
dojo.string.normalizeNewlines=function(text,_1fc){
1918
if(_1fc=="\n"){
1318 alexandre_ 1919
text=text.replace(/\r\n/g,"\n");
1920
text=text.replace(/\r/g,"\n");
1921
}else{
1422 alexandre_ 1922
if(_1fc=="\r"){
1318 alexandre_ 1923
text=text.replace(/\r\n/g,"\r");
1924
text=text.replace(/\n/g,"\r");
1925
}else{
1926
text=text.replace(/([^\r])\n/g,"$1\r\n").replace(/\r([^\n])/g,"\r\n$1");
1927
}
1928
}
1929
return text;
1930
};
1422 alexandre_ 1931
dojo.string.splitEscaped=function(str,_1fe){
1932
var _1ff=[];
1933
for(var i=0,_201=0;i<str.length;i++){
1318 alexandre_ 1934
if(str.charAt(i)=="\\"){
1935
i++;
1936
continue;
1937
}
1422 alexandre_ 1938
if(str.charAt(i)==_1fe){
1939
_1ff.push(str.substring(_201,i));
1940
_201=i+1;
1318 alexandre_ 1941
}
1942
}
1422 alexandre_ 1943
_1ff.push(str.substr(_201));
1944
return _1ff;
1318 alexandre_ 1945
};
1946
dojo.provide("dojo.dom");
1947
dojo.dom.ELEMENT_NODE=1;
1948
dojo.dom.ATTRIBUTE_NODE=2;
1949
dojo.dom.TEXT_NODE=3;
1950
dojo.dom.CDATA_SECTION_NODE=4;
1951
dojo.dom.ENTITY_REFERENCE_NODE=5;
1952
dojo.dom.ENTITY_NODE=6;
1953
dojo.dom.PROCESSING_INSTRUCTION_NODE=7;
1954
dojo.dom.COMMENT_NODE=8;
1955
dojo.dom.DOCUMENT_NODE=9;
1956
dojo.dom.DOCUMENT_TYPE_NODE=10;
1957
dojo.dom.DOCUMENT_FRAGMENT_NODE=11;
1958
dojo.dom.NOTATION_NODE=12;
1959
dojo.dom.dojoml="http://www.dojotoolkit.org/2004/dojoml";
1960
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/"};
1961
dojo.dom.isNode=function(wh){
1962
if(typeof Element=="function"){
1963
try{
1964
return wh instanceof Element;
1965
}
1966
catch(e){
1967
}
1968
}else{
1969
return wh&&!isNaN(wh.nodeType);
1970
}
1971
};
1972
dojo.dom.getUniqueId=function(){
1422 alexandre_ 1973
var _203=dojo.doc();
1318 alexandre_ 1974
do{
1975
var id="dj_unique_"+(++arguments.callee._idIncrement);
1422 alexandre_ 1976
}while(_203.getElementById(id));
1318 alexandre_ 1977
return id;
1978
};
1979
dojo.dom.getUniqueId._idIncrement=0;
1422 alexandre_ 1980
dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_205,_206){
1981
var node=_205.firstChild;
1318 alexandre_ 1982
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
1983
node=node.nextSibling;
1984
}
1422 alexandre_ 1985
if(_206&&node&&node.tagName&&node.tagName.toLowerCase()!=_206.toLowerCase()){
1986
node=dojo.dom.nextElement(node,_206);
1318 alexandre_ 1987
}
1988
return node;
1989
};
1422 alexandre_ 1990
dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_208,_209){
1991
var node=_208.lastChild;
1318 alexandre_ 1992
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
1993
node=node.previousSibling;
1994
}
1422 alexandre_ 1995
if(_209&&node&&node.tagName&&node.tagName.toLowerCase()!=_209.toLowerCase()){
1996
node=dojo.dom.prevElement(node,_209);
1318 alexandre_ 1997
}
1998
return node;
1999
};
1422 alexandre_ 2000
dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(node,_20c){
1318 alexandre_ 2001
if(!node){
2002
return null;
2003
}
2004
do{
2005
node=node.nextSibling;
2006
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
1422 alexandre_ 2007
if(node&&_20c&&_20c.toLowerCase()!=node.tagName.toLowerCase()){
2008
return dojo.dom.nextElement(node,_20c);
1318 alexandre_ 2009
}
2010
return node;
2011
};
1422 alexandre_ 2012
dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(node,_20e){
1318 alexandre_ 2013
if(!node){
2014
return null;
2015
}
1422 alexandre_ 2016
if(_20e){
2017
_20e=_20e.toLowerCase();
1318 alexandre_ 2018
}
2019
do{
2020
node=node.previousSibling;
2021
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
1422 alexandre_ 2022
if(node&&_20e&&_20e.toLowerCase()!=node.tagName.toLowerCase()){
2023
return dojo.dom.prevElement(node,_20e);
1318 alexandre_ 2024
}
2025
return node;
2026
};
1422 alexandre_ 2027
dojo.dom.moveChildren=function(_20f,_210,trim){
2028
var _212=0;
1318 alexandre_ 2029
if(trim){
1422 alexandre_ 2030
while(_20f.hasChildNodes()&&_20f.firstChild.nodeType==dojo.dom.TEXT_NODE){
2031
_20f.removeChild(_20f.firstChild);
1318 alexandre_ 2032
}
1422 alexandre_ 2033
while(_20f.hasChildNodes()&&_20f.lastChild.nodeType==dojo.dom.TEXT_NODE){
2034
_20f.removeChild(_20f.lastChild);
1318 alexandre_ 2035
}
2036
}
1422 alexandre_ 2037
while(_20f.hasChildNodes()){
2038
_210.appendChild(_20f.firstChild);
2039
_212++;
1318 alexandre_ 2040
}
1422 alexandre_ 2041
return _212;
1318 alexandre_ 2042
};
1422 alexandre_ 2043
dojo.dom.copyChildren=function(_213,_214,trim){
2044
var _216=_213.cloneNode(true);
2045
return this.moveChildren(_216,_214,trim);
1318 alexandre_ 2046
};
1422 alexandre_ 2047
dojo.dom.replaceChildren=function(node,_218){
2048
var _219=[];
1318 alexandre_ 2049
if(dojo.render.html.ie){
2050
for(var i=0;i<node.childNodes.length;i++){
1422 alexandre_ 2051
_219.push(node.childNodes[i]);
1318 alexandre_ 2052
}
2053
}
2054
dojo.dom.removeChildren(node);
1422 alexandre_ 2055
node.appendChild(_218);
2056
for(var i=0;i<_219.length;i++){
2057
dojo.dom.destroyNode(_219[i]);
1318 alexandre_ 2058
}
2059
};
2060
dojo.dom.removeChildren=function(node){
1422 alexandre_ 2061
var _21c=node.childNodes.length;
1318 alexandre_ 2062
while(node.hasChildNodes()){
2063
dojo.dom.removeNode(node.firstChild);
2064
}
1422 alexandre_ 2065
return _21c;
1318 alexandre_ 2066
};
1422 alexandre_ 2067
dojo.dom.replaceNode=function(node,_21e){
2068
return node.parentNode.replaceChild(_21e,node);
1318 alexandre_ 2069
};
2070
dojo.dom.destroyNode=function(node){
2071
if(node.parentNode){
2072
node=dojo.dom.removeNode(node);
2073
}
2074
if(node.nodeType!=3){
2075
if(dojo.evalObjPath("dojo.event.browser.clean",false)){
2076
dojo.event.browser.clean(node);
2077
}
2078
if(dojo.render.html.ie){
2079
node.outerHTML="";
2080
}
2081
}
2082
};
2083
dojo.dom.removeNode=function(node){
2084
if(node&&node.parentNode){
2085
return node.parentNode.removeChild(node);
2086
}
2087
};
1422 alexandre_ 2088
dojo.dom.getAncestors=function(node,_222,_223){
2089
var _224=[];
2090
var _225=(_222&&(_222 instanceof Function||typeof _222=="function"));
1318 alexandre_ 2091
while(node){
1422 alexandre_ 2092
if(!_225||_222(node)){
2093
_224.push(node);
1318 alexandre_ 2094
}
1422 alexandre_ 2095
if(_223&&_224.length>0){
2096
return _224[0];
1318 alexandre_ 2097
}
2098
node=node.parentNode;
2099
}
1422 alexandre_ 2100
if(_223){
1318 alexandre_ 2101
return null;
2102
}
1422 alexandre_ 2103
return _224;
1318 alexandre_ 2104
};
1422 alexandre_ 2105
dojo.dom.getAncestorsByTag=function(node,tag,_228){
1318 alexandre_ 2106
tag=tag.toLowerCase();
2107
return dojo.dom.getAncestors(node,function(el){
2108
return ((el.tagName)&&(el.tagName.toLowerCase()==tag));
1422 alexandre_ 2109
},_228);
1318 alexandre_ 2110
};
2111
dojo.dom.getFirstAncestorByTag=function(node,tag){
2112
return dojo.dom.getAncestorsByTag(node,tag,true);
2113
};
1422 alexandre_ 2114
dojo.dom.isDescendantOf=function(node,_22d,_22e){
2115
if(_22e&&node){
1318 alexandre_ 2116
node=node.parentNode;
2117
}
2118
while(node){
1422 alexandre_ 2119
if(node==_22d){
1318 alexandre_ 2120
return true;
2121
}
2122
node=node.parentNode;
2123
}
2124
return false;
2125
};
2126
dojo.dom.innerXML=function(node){
2127
if(node.innerXML){
2128
return node.innerXML;
2129
}else{
2130
if(node.xml){
2131
return node.xml;
2132
}else{
2133
if(typeof XMLSerializer!="undefined"){
2134
return (new XMLSerializer()).serializeToString(node);
2135
}
2136
}
2137
}
2138
};
2139
dojo.dom.createDocument=function(){
2140
var doc=null;
1422 alexandre_ 2141
var _231=dojo.doc();
1318 alexandre_ 2142
if(!dj_undef("ActiveXObject")){
1422 alexandre_ 2143
var _232=["MSXML2","Microsoft","MSXML","MSXML3"];
2144
for(var i=0;i<_232.length;i++){
1318 alexandre_ 2145
try{
1422 alexandre_ 2146
doc=new ActiveXObject(_232[i]+".XMLDOM");
1318 alexandre_ 2147
}
2148
catch(e){
2149
}
2150
if(doc){
2151
break;
2152
}
2153
}
2154
}else{
1422 alexandre_ 2155
if((_231.implementation)&&(_231.implementation.createDocument)){
2156
doc=_231.implementation.createDocument("","",null);
1318 alexandre_ 2157
}
2158
}
2159
return doc;
2160
};
1422 alexandre_ 2161
dojo.dom.createDocumentFromText=function(str,_235){
2162
if(!_235){
2163
_235="text/xml";
1318 alexandre_ 2164
}
2165
if(!dj_undef("DOMParser")){
1422 alexandre_ 2166
var _236=new DOMParser();
2167
return _236.parseFromString(str,_235);
1318 alexandre_ 2168
}else{
2169
if(!dj_undef("ActiveXObject")){
1422 alexandre_ 2170
var _237=dojo.dom.createDocument();
2171
if(_237){
2172
_237.async=false;
2173
_237.loadXML(str);
2174
return _237;
1318 alexandre_ 2175
}else{
2176
dojo.debug("toXml didn't work?");
2177
}
2178
}else{
1422 alexandre_ 2179
var _238=dojo.doc();
2180
if(_238.createElement){
2181
var tmp=_238.createElement("xml");
1318 alexandre_ 2182
tmp.innerHTML=str;
1422 alexandre_ 2183
if(_238.implementation&&_238.implementation.createDocument){
2184
var _23a=_238.implementation.createDocument("foo","",null);
1318 alexandre_ 2185
for(var i=0;i<tmp.childNodes.length;i++){
1422 alexandre_ 2186
_23a.importNode(tmp.childNodes.item(i),true);
1318 alexandre_ 2187
}
1422 alexandre_ 2188
return _23a;
1318 alexandre_ 2189
}
2190
return ((tmp.document)&&(tmp.document.firstChild?tmp.document.firstChild:tmp));
2191
}
2192
}
2193
}
2194
return null;
2195
};
1422 alexandre_ 2196
dojo.dom.prependChild=function(node,_23d){
2197
if(_23d.firstChild){
2198
_23d.insertBefore(node,_23d.firstChild);
1318 alexandre_ 2199
}else{
1422 alexandre_ 2200
_23d.appendChild(node);
1318 alexandre_ 2201
}
2202
return true;
2203
};
1422 alexandre_ 2204
dojo.dom.insertBefore=function(node,ref,_240){
2205
if((_240!=true)&&(node===ref||node.nextSibling===ref)){
1318 alexandre_ 2206
return false;
2207
}
1422 alexandre_ 2208
var _241=ref.parentNode;
2209
_241.insertBefore(node,ref);
1318 alexandre_ 2210
return true;
2211
};
1422 alexandre_ 2212
dojo.dom.insertAfter=function(node,ref,_244){
1318 alexandre_ 2213
var pn=ref.parentNode;
2214
if(ref==pn.lastChild){
1422 alexandre_ 2215
if((_244!=true)&&(node===ref)){
1318 alexandre_ 2216
return false;
2217
}
2218
pn.appendChild(node);
2219
}else{
1422 alexandre_ 2220
return this.insertBefore(node,ref.nextSibling,_244);
1318 alexandre_ 2221
}
2222
return true;
2223
};
1422 alexandre_ 2224
dojo.dom.insertAtPosition=function(node,ref,_248){
2225
if((!node)||(!ref)||(!_248)){
1318 alexandre_ 2226
return false;
2227
}
1422 alexandre_ 2228
switch(_248.toLowerCase()){
1318 alexandre_ 2229
case "before":
2230
return dojo.dom.insertBefore(node,ref);
2231
case "after":
2232
return dojo.dom.insertAfter(node,ref);
2233
case "first":
2234
if(ref.firstChild){
2235
return dojo.dom.insertBefore(node,ref.firstChild);
2236
}else{
2237
ref.appendChild(node);
2238
return true;
2239
}
2240
break;
2241
default:
2242
ref.appendChild(node);
2243
return true;
2244
}
2245
};
1422 alexandre_ 2246
dojo.dom.insertAtIndex=function(node,_24a,_24b){
2247
var _24c=_24a.childNodes;
2248
if(!_24c.length||_24c.length==_24b){
2249
_24a.appendChild(node);
1318 alexandre_ 2250
return true;
2251
}
1422 alexandre_ 2252
if(_24b==0){
2253
return dojo.dom.prependChild(node,_24a);
1318 alexandre_ 2254
}
1422 alexandre_ 2255
return dojo.dom.insertAfter(node,_24c[_24b-1]);
1318 alexandre_ 2256
};
2257
dojo.dom.textContent=function(node,text){
2258
if(arguments.length>1){
1422 alexandre_ 2259
var _24f=dojo.doc();
2260
dojo.dom.replaceChildren(node,_24f.createTextNode(text));
1318 alexandre_ 2261
return text;
2262
}else{
2263
if(node.textContent!=undefined){
2264
return node.textContent;
2265
}
1422 alexandre_ 2266
var _250="";
1318 alexandre_ 2267
if(node==null){
1422 alexandre_ 2268
return _250;
1318 alexandre_ 2269
}
2270
for(var i=0;i<node.childNodes.length;i++){
2271
switch(node.childNodes[i].nodeType){
2272
case 1:
2273
case 5:
1422 alexandre_ 2274
_250+=dojo.dom.textContent(node.childNodes[i]);
1318 alexandre_ 2275
break;
2276
case 3:
2277
case 2:
2278
case 4:
1422 alexandre_ 2279
_250+=node.childNodes[i].nodeValue;
1318 alexandre_ 2280
break;
2281
default:
2282
break;
2283
}
2284
}
1422 alexandre_ 2285
return _250;
1318 alexandre_ 2286
}
2287
};
2288
dojo.dom.hasParent=function(node){
2289
return Boolean(node&&node.parentNode&&dojo.dom.isNode(node.parentNode));
2290
};
2291
dojo.dom.isTag=function(node){
2292
if(node&&node.tagName){
2293
for(var i=1;i<arguments.length;i++){
2294
if(node.tagName==String(arguments[i])){
2295
return String(arguments[i]);
2296
}
2297
}
2298
}
2299
return "";
2300
};
1422 alexandre_ 2301
dojo.dom.setAttributeNS=function(elem,_256,_257,_258){
1318 alexandre_ 2302
if(elem==null||((elem==undefined)&&(typeof elem=="undefined"))){
2303
dojo.raise("No element given to dojo.dom.setAttributeNS");
2304
}
2305
if(!((elem.setAttributeNS==undefined)&&(typeof elem.setAttributeNS=="undefined"))){
1422 alexandre_ 2306
elem.setAttributeNS(_256,_257,_258);
1318 alexandre_ 2307
}else{
1422 alexandre_ 2308
var _259=elem.ownerDocument;
2309
var _25a=_259.createNode(2,_257,_256);
2310
_25a.nodeValue=_258;
2311
elem.setAttributeNode(_25a);
1318 alexandre_ 2312
}
2313
};
2314
dojo.provide("dojo.undo.browser");
2315
try{
2316
if((!djConfig["preventBackButtonFix"])&&(!dojo.hostenv.post_load_)){
2317
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>");
2318
}
2319
}
2320
catch(e){
2321
}
2322
if(dojo.render.html.opera){
2323
dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work.");
2324
}
2325
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){
2326
this.initialState=this._createState(this.initialHref,args,this.initialHash);
2327
},addToHistory:function(args){
2328
this.forwardStack=[];
2329
var hash=null;
2330
var url=null;
2331
if(!this.historyIframe){
2332
if(djConfig["useXDomain"]&&!djConfig["dojoIframeHistoryUrl"]){
2333
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");
2334
}
2335
this.historyIframe=window.frames["djhistory"];
2336
}
2337
if(!this.bookmarkAnchor){
2338
this.bookmarkAnchor=document.createElement("a");
2339
dojo.body().appendChild(this.bookmarkAnchor);
2340
this.bookmarkAnchor.style.display="none";
2341
}
2342
if(args["changeUrl"]){
2343
hash="#"+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());
2344
if(this.historyStack.length==0&&this.initialState.urlHash==hash){
2345
this.initialState=this._createState(url,args,hash);
2346
return;
2347
}else{
2348
if(this.historyStack.length>0&&this.historyStack[this.historyStack.length-1].urlHash==hash){
2349
this.historyStack[this.historyStack.length-1]=this._createState(url,args,hash);
2350
return;
2351
}
2352
}
2353
this.changingUrl=true;
2354
setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;",1);
2355
this.bookmarkAnchor.href=hash;
2356
if(dojo.render.html.ie){
2357
url=this._loadIframeHistory();
1422 alexandre_ 2358
var _25f=args["back"]||args["backButton"]||args["handle"];
2359
var tcb=function(_261){
1318 alexandre_ 2360
if(window.location.hash!=""){
2361
setTimeout("window.location.href = '"+hash+"';",1);
2362
}
1422 alexandre_ 2363
_25f.apply(this,[_261]);
1318 alexandre_ 2364
};
2365
if(args["back"]){
2366
args.back=tcb;
2367
}else{
2368
if(args["backButton"]){
2369
args.backButton=tcb;
2370
}else{
2371
if(args["handle"]){
2372
args.handle=tcb;
2373
}
2374
}
2375
}
1422 alexandre_ 2376
var _262=args["forward"]||args["forwardButton"]||args["handle"];
2377
var tfw=function(_264){
1318 alexandre_ 2378
if(window.location.hash!=""){
2379
window.location.href=hash;
2380
}
1422 alexandre_ 2381
if(_262){
2382
_262.apply(this,[_264]);
1318 alexandre_ 2383
}
2384
};
2385
if(args["forward"]){
2386
args.forward=tfw;
2387
}else{
2388
if(args["forwardButton"]){
2389
args.forwardButton=tfw;
2390
}else{
2391
if(args["handle"]){
2392
args.handle=tfw;
2393
}
2394
}
2395
}
2396
}else{
2397
if(dojo.render.html.moz){
2398
if(!this.locationTimer){
2399
this.locationTimer=setInterval("dojo.undo.browser.checkLocation();",200);
2400
}
2401
}
2402
}
2403
}else{
2404
url=this._loadIframeHistory();
2405
}
2406
this.historyStack.push(this._createState(url,args,hash));
2407
},checkLocation:function(){
2408
if(!this.changingUrl){
2409
var hsl=this.historyStack.length;
2410
if((window.location.hash==this.initialHash||window.location.href==this.initialHref)&&(hsl==1)){
2411
this.handleBackButton();
2412
return;
2413
}
2414
if(this.forwardStack.length>0){
2415
if(this.forwardStack[this.forwardStack.length-1].urlHash==window.location.hash){
2416
this.handleForwardButton();
2417
return;
2418
}
2419
}
2420
if((hsl>=2)&&(this.historyStack[hsl-2])){
2421
if(this.historyStack[hsl-2].urlHash==window.location.hash){
2422
this.handleBackButton();
2423
return;
2424
}
2425
}
2426
}
1422 alexandre_ 2427
},iframeLoaded:function(evt,_267){
1318 alexandre_ 2428
if(!dojo.render.html.opera){
1422 alexandre_ 2429
var _268=this._getUrlQuery(_267.href);
2430
if(_268==null){
1318 alexandre_ 2431
if(this.historyStack.length==1){
2432
this.handleBackButton();
2433
}
2434
return;
2435
}
2436
if(this.moveForward){
2437
this.moveForward=false;
2438
return;
2439
}
1422 alexandre_ 2440
if(this.historyStack.length>=2&&_268==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){
1318 alexandre_ 2441
this.handleBackButton();
2442
}else{
1422 alexandre_ 2443
if(this.forwardStack.length>0&&_268==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){
1318 alexandre_ 2444
this.handleForwardButton();
2445
}
2446
}
2447
}
2448
},handleBackButton:function(){
1422 alexandre_ 2449
var _269=this.historyStack.pop();
2450
if(!_269){
1318 alexandre_ 2451
return;
2452
}
2453
var last=this.historyStack[this.historyStack.length-1];
2454
if(!last&&this.historyStack.length==0){
2455
last=this.initialState;
2456
}
2457
if(last){
2458
if(last.kwArgs["back"]){
2459
last.kwArgs["back"]();
2460
}else{
2461
if(last.kwArgs["backButton"]){
2462
last.kwArgs["backButton"]();
2463
}else{
2464
if(last.kwArgs["handle"]){
2465
last.kwArgs.handle("back");
2466
}
2467
}
2468
}
2469
}
1422 alexandre_ 2470
this.forwardStack.push(_269);
1318 alexandre_ 2471
},handleForwardButton:function(){
2472
var last=this.forwardStack.pop();
2473
if(!last){
2474
return;
2475
}
2476
if(last.kwArgs["forward"]){
2477
last.kwArgs.forward();
2478
}else{
2479
if(last.kwArgs["forwardButton"]){
2480
last.kwArgs.forwardButton();
2481
}else{
2482
if(last.kwArgs["handle"]){
2483
last.kwArgs.handle("forward");
2484
}
2485
}
2486
}
2487
this.historyStack.push(last);
2488
},_createState:function(url,args,hash){
2489
return {"url":url,"kwArgs":args,"urlHash":hash};
2490
},_getUrlQuery:function(url){
1422 alexandre_ 2491
var _270=url.split("?");
2492
if(_270.length<2){
1318 alexandre_ 2493
return null;
2494
}else{
1422 alexandre_ 2495
return _270[1];
1318 alexandre_ 2496
}
2497
},_loadIframeHistory:function(){
2498
var url=(djConfig["dojoIframeHistoryUrl"]||dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"?"+(new Date()).getTime();
2499
this.moveForward=true;
2500
dojo.io.setIFrameSrc(this.historyIframe,url,false);
2501
return url;
2502
}};
2503
dojo.provide("dojo.io.BrowserIO");
2504
if(!dj_undef("window")){
2505
dojo.io.checkChildrenForFile=function(node){
1422 alexandre_ 2506
var _273=false;
2507
var _274=node.getElementsByTagName("input");
2508
dojo.lang.forEach(_274,function(_275){
2509
if(_273){
1318 alexandre_ 2510
return;
2511
}
1422 alexandre_ 2512
if(_275.getAttribute("type")=="file"){
2513
_273=true;
1318 alexandre_ 2514
}
2515
});
1422 alexandre_ 2516
return _273;
1318 alexandre_ 2517
};
1422 alexandre_ 2518
dojo.io.formHasFile=function(_276){
2519
return dojo.io.checkChildrenForFile(_276);
1318 alexandre_ 2520
};
1422 alexandre_ 2521
dojo.io.updateNode=function(node,_278){
1318 alexandre_ 2522
node=dojo.byId(node);
1422 alexandre_ 2523
var args=_278;
2524
if(dojo.lang.isString(_278)){
2525
args={url:_278};
1318 alexandre_ 2526
}
2527
args.mimetype="text/html";
2528
args.load=function(t,d,e){
2529
while(node.firstChild){
2530
dojo.dom.destroyNode(node.firstChild);
2531
}
2532
node.innerHTML=d;
2533
};
2534
dojo.io.bind(args);
2535
};
2536
dojo.io.formFilter=function(node){
2537
var type=(node.type||"").toLowerCase();
2538
return !node.disabled&&node.name&&!dojo.lang.inArray(["file","submit","image","reset","button"],type);
2539
};
1422 alexandre_ 2540
dojo.io.encodeForm=function(_27f,_280,_281){
2541
if((!_27f)||(!_27f.tagName)||(!_27f.tagName.toLowerCase()=="form")){
1318 alexandre_ 2542
dojo.raise("Attempted to encode a non-form element.");
2543
}
1422 alexandre_ 2544
if(!_281){
2545
_281=dojo.io.formFilter;
1318 alexandre_ 2546
}
1422 alexandre_ 2547
var enc=/utf/i.test(_280||"")?encodeURIComponent:dojo.string.encodeAscii;
2548
var _283=[];
2549
for(var i=0;i<_27f.elements.length;i++){
2550
var elm=_27f.elements[i];
2551
if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_281(elm)){
1318 alexandre_ 2552
continue;
2553
}
2554
var name=enc(elm.name);
2555
var type=elm.type.toLowerCase();
2556
if(type=="select-multiple"){
2557
for(var j=0;j<elm.options.length;j++){
2558
if(elm.options[j].selected){
1422 alexandre_ 2559
_283.push(name+"="+enc(elm.options[j].value));
1318 alexandre_ 2560
}
2561
}
2562
}else{
2563
if(dojo.lang.inArray(["radio","checkbox"],type)){
2564
if(elm.checked){
1422 alexandre_ 2565
_283.push(name+"="+enc(elm.value));
1318 alexandre_ 2566
}
2567
}else{
1422 alexandre_ 2568
_283.push(name+"="+enc(elm.value));
1318 alexandre_ 2569
}
2570
}
2571
}
1422 alexandre_ 2572
var _289=_27f.getElementsByTagName("input");
2573
for(var i=0;i<_289.length;i++){
2574
var _28a=_289[i];
2575
if(_28a.type.toLowerCase()=="image"&&_28a.form==_27f&&_281(_28a)){
2576
var name=enc(_28a.name);
2577
_283.push(name+"="+enc(_28a.value));
2578
_283.push(name+".x=0");
2579
_283.push(name+".y=0");
1318 alexandre_ 2580
}
2581
}
1422 alexandre_ 2582
return _283.join("&")+"&";
1318 alexandre_ 2583
};
2584
dojo.io.FormBind=function(args){
2585
this.bindArgs={};
2586
if(args&&args.formNode){
2587
this.init(args);
2588
}else{
2589
if(args){
2590
this.init({formNode:args});
2591
}
2592
}
2593
};
2594
dojo.lang.extend(dojo.io.FormBind,{form:null,bindArgs:null,clickedButton:null,init:function(args){
2595
var form=dojo.byId(args.formNode);
2596
if(!form||!form.tagName||form.tagName.toLowerCase()!="form"){
2597
throw new Error("FormBind: Couldn't apply, invalid form");
2598
}else{
2599
if(this.form==form){
2600
return;
2601
}else{
2602
if(this.form){
2603
throw new Error("FormBind: Already applied to a form");
2604
}
2605
}
2606
}
2607
dojo.lang.mixin(this.bindArgs,args);
2608
this.form=form;
2609
this.connect(form,"onsubmit","submit");
2610
for(var i=0;i<form.elements.length;i++){
2611
var node=form.elements[i];
2612
if(node&&node.type&&dojo.lang.inArray(["submit","button"],node.type.toLowerCase())){
2613
this.connect(node,"onclick","click");
2614
}
2615
}
1422 alexandre_ 2616
var _290=form.getElementsByTagName("input");
2617
for(var i=0;i<_290.length;i++){
2618
var _291=_290[i];
2619
if(_291.type.toLowerCase()=="image"&&_291.form==form){
2620
this.connect(_291,"onclick","click");
1318 alexandre_ 2621
}
2622
}
2623
},onSubmit:function(form){
2624
return true;
2625
},submit:function(e){
2626
e.preventDefault();
2627
if(this.onSubmit(this.form)){
2628
dojo.io.bind(dojo.lang.mixin(this.bindArgs,{formFilter:dojo.lang.hitch(this,"formFilter")}));
2629
}
2630
},click:function(e){
2631
var node=e.currentTarget;
2632
if(node.disabled){
2633
return;
2634
}
2635
this.clickedButton=node;
2636
},formFilter:function(node){
2637
var type=(node.type||"").toLowerCase();
1422 alexandre_ 2638
var _298=false;
1318 alexandre_ 2639
if(node.disabled||!node.name){
1422 alexandre_ 2640
_298=false;
1318 alexandre_ 2641
}else{
2642
if(dojo.lang.inArray(["submit","button","image"],type)){
2643
if(!this.clickedButton){
2644
this.clickedButton=node;
2645
}
1422 alexandre_ 2646
_298=node==this.clickedButton;
1318 alexandre_ 2647
}else{
1422 alexandre_ 2648
_298=!dojo.lang.inArray(["file","submit","reset","button"],type);
1318 alexandre_ 2649
}
2650
}
1422 alexandre_ 2651
return _298;
2652
},connect:function(_299,_29a,_29b){
1318 alexandre_ 2653
if(dojo.evalObjPath("dojo.event.connect")){
1422 alexandre_ 2654
dojo.event.connect(_299,_29a,this,_29b);
1318 alexandre_ 2655
}else{
1422 alexandre_ 2656
var fcn=dojo.lang.hitch(this,_29b);
2657
_299[_29a]=function(e){
1318 alexandre_ 2658
if(!e){
2659
e=window.event;
2660
}
2661
if(!e.currentTarget){
2662
e.currentTarget=e.srcElement;
2663
}
2664
if(!e.preventDefault){
2665
e.preventDefault=function(){
2666
window.event.returnValue=false;
2667
};
2668
}
2669
fcn(e);
2670
};
2671
}
2672
}});
2673
dojo.io.XMLHTTPTransport=new function(){
1422 alexandre_ 2674
var _29e=this;
2675
var _29f={};
1318 alexandre_ 2676
this.useCache=false;
2677
this.preventCache=false;
1422 alexandre_ 2678
function getCacheKey(url,_2a1,_2a2){
2679
return url+"|"+_2a1+"|"+_2a2.toLowerCase();
1318 alexandre_ 2680
}
1422 alexandre_ 2681
function addToCache(url,_2a4,_2a5,http){
2682
_29f[getCacheKey(url,_2a4,_2a5)]=http;
1318 alexandre_ 2683
}
1422 alexandre_ 2684
function getFromCache(url,_2a8,_2a9){
2685
return _29f[getCacheKey(url,_2a8,_2a9)];
1318 alexandre_ 2686
}
2687
this.clearCache=function(){
1422 alexandre_ 2688
_29f={};
1318 alexandre_ 2689
};
1422 alexandre_ 2690
function doLoad(_2aa,http,url,_2ad,_2ae){
2691
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))){
1318 alexandre_ 2692
var ret;
1422 alexandre_ 2693
if(_2aa.method.toLowerCase()=="head"){
2694
var _2b0=http.getAllResponseHeaders();
1318 alexandre_ 2695
ret={};
2696
ret.toString=function(){
1422 alexandre_ 2697
return _2b0;
1318 alexandre_ 2698
};
1422 alexandre_ 2699
var _2b1=_2b0.split(/[\r\n]+/g);
2700
for(var i=0;i<_2b1.length;i++){
2701
var pair=_2b1[i].match(/^([^:]+)\s*:\s*(.+)$/i);
1318 alexandre_ 2702
if(pair){
2703
ret[pair[1]]=pair[2];
2704
}
2705
}
2706
}else{
1422 alexandre_ 2707
if(_2aa.mimetype=="text/javascript"){
1318 alexandre_ 2708
try{
2709
ret=dj_eval(http.responseText);
2710
}
2711
catch(e){
2712
dojo.debug(e);
2713
dojo.debug(http.responseText);
2714
ret=null;
2715
}
2716
}else{
1422 alexandre_ 2717
if(_2aa.mimetype.substr(0,9)=="text/json"||_2aa.mimetype.substr(0,16)=="application/json"){
1318 alexandre_ 2718
try{
1422 alexandre_ 2719
ret=dj_eval("("+_2aa.jsonFilter(http.responseText)+")");
1318 alexandre_ 2720
}
2721
catch(e){
2722
dojo.debug(e);
2723
dojo.debug(http.responseText);
2724
ret=false;
2725
}
2726
}else{
1422 alexandre_ 2727
if((_2aa.mimetype=="application/xml")||(_2aa.mimetype=="text/xml")){
1318 alexandre_ 2728
ret=http.responseXML;
2729
if(!ret||typeof ret=="string"||!http.getResponseHeader("Content-Type")){
2730
ret=dojo.dom.createDocumentFromText(http.responseText);
2731
}
2732
}else{
2733
ret=http.responseText;
2734
}
2735
}
2736
}
2737
}
1422 alexandre_ 2738
if(_2ae){
2739
addToCache(url,_2ad,_2aa.method,http);
1318 alexandre_ 2740
}
1422 alexandre_ 2741
_2aa[(typeof _2aa.load=="function")?"load":"handle"]("load",ret,http,_2aa);
1318 alexandre_ 2742
}else{
1422 alexandre_ 2743
var _2b4=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText);
2744
_2aa[(typeof _2aa.error=="function")?"error":"handle"]("error",_2b4,http,_2aa);
1318 alexandre_ 2745
}
2746
}
1422 alexandre_ 2747
function setHeaders(http,_2b6){
2748
if(_2b6["headers"]){
2749
for(var _2b7 in _2b6["headers"]){
2750
if(_2b7.toLowerCase()=="content-type"&&!_2b6["contentType"]){
2751
_2b6["contentType"]=_2b6["headers"][_2b7];
1318 alexandre_ 2752
}else{
1422 alexandre_ 2753
http.setRequestHeader(_2b7,_2b6["headers"][_2b7]);
1318 alexandre_ 2754
}
2755
}
2756
}
2757
}
2758
this.inFlight=[];
2759
this.inFlightTimer=null;
2760
this.startWatchingInFlight=function(){
2761
if(!this.inFlightTimer){
2762
this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10);
2763
}
2764
};
2765
this.watchInFlight=function(){
2766
var now=null;
1422 alexandre_ 2767
if(!dojo.hostenv._blockAsync&&!_29e._blockAsync){
1318 alexandre_ 2768
for(var x=this.inFlight.length-1;x>=0;x--){
2769
try{
2770
var tif=this.inFlight[x];
2771
if(!tif||tif.http._aborted||!tif.http.readyState){
2772
this.inFlight.splice(x,1);
2773
continue;
2774
}
2775
if(4==tif.http.readyState){
2776
this.inFlight.splice(x,1);
2777
doLoad(tif.req,tif.http,tif.url,tif.query,tif.useCache);
2778
}else{
2779
if(tif.startTime){
2780
if(!now){
2781
now=(new Date()).getTime();
2782
}
2783
if(tif.startTime+(tif.req.timeoutSeconds*1000)<now){
2784
if(typeof tif.http.abort=="function"){
2785
tif.http.abort();
2786
}
2787
this.inFlight.splice(x,1);
2788
tif.req[(typeof tif.req.timeout=="function")?"timeout":"handle"]("timeout",null,tif.http,tif.req);
2789
}
2790
}
2791
}
2792
}
2793
catch(e){
2794
try{
1422 alexandre_ 2795
var _2bb=new dojo.io.Error("XMLHttpTransport.watchInFlight Error: "+e);
2796
tif.req[(typeof tif.req.error=="function")?"error":"handle"]("error",_2bb,tif.http,tif.req);
1318 alexandre_ 2797
}
2798
catch(e2){
2799
dojo.debug("XMLHttpTransport error callback failed: "+e2);
2800
}
2801
}
2802
}
2803
}
2804
clearTimeout(this.inFlightTimer);
2805
if(this.inFlight.length==0){
2806
this.inFlightTimer=null;
2807
return;
2808
}
2809
this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10);
2810
};
1422 alexandre_ 2811
var _2bc=dojo.hostenv.getXmlhttpObject()?true:false;
2812
this.canHandle=function(_2bd){
2813
var mlc=_2bd["mimetype"].toLowerCase()||"";
2814
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"]));
1318 alexandre_ 2815
};
2816
this.multipartBoundary="45309FFF-BD65-4d50-99C9-36986896A96F";
1422 alexandre_ 2817
this.bind=function(_2bf){
2818
if(!_2bf["url"]){
2819
if(!_2bf["formNode"]&&(_2bf["backButton"]||_2bf["back"]||_2bf["changeUrl"]||_2bf["watchForURL"])&&(!djConfig.preventBackButtonFix)){
1318 alexandre_ 2820
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");
1422 alexandre_ 2821
dojo.undo.browser.addToHistory(_2bf);
1318 alexandre_ 2822
return true;
2823
}
2824
}
1422 alexandre_ 2825
var url=_2bf.url;
2826
var _2c1="";
2827
if(_2bf["formNode"]){
2828
var ta=_2bf.formNode.getAttribute("action");
2829
if((ta)&&(!_2bf["url"])){
1318 alexandre_ 2830
url=ta;
2831
}
1422 alexandre_ 2832
var tp=_2bf.formNode.getAttribute("method");
2833
if((tp)&&(!_2bf["method"])){
2834
_2bf.method=tp;
1318 alexandre_ 2835
}
1422 alexandre_ 2836
_2c1+=dojo.io.encodeForm(_2bf.formNode,_2bf.encoding,_2bf["formFilter"]);
1318 alexandre_ 2837
}
2838
if(url.indexOf("#")>-1){
2839
dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url);
2840
url=url.split("#")[0];
2841
}
1422 alexandre_ 2842
if(_2bf["file"]){
2843
_2bf.method="post";
1318 alexandre_ 2844
}
1422 alexandre_ 2845
if(!_2bf["method"]){
2846
_2bf.method="get";
1318 alexandre_ 2847
}
1422 alexandre_ 2848
if(_2bf.method.toLowerCase()=="get"){
2849
_2bf.multipart=false;
1318 alexandre_ 2850
}else{
1422 alexandre_ 2851
if(_2bf["file"]){
2852
_2bf.multipart=true;
1318 alexandre_ 2853
}else{
1422 alexandre_ 2854
if(!_2bf["multipart"]){
2855
_2bf.multipart=false;
1318 alexandre_ 2856
}
2857
}
2858
}
1422 alexandre_ 2859
if(_2bf["backButton"]||_2bf["back"]||_2bf["changeUrl"]){
2860
dojo.undo.browser.addToHistory(_2bf);
1318 alexandre_ 2861
}
1422 alexandre_ 2862
var _2c4=_2bf["content"]||{};
2863
if(_2bf.sendTransport){
2864
_2c4["dojo.transport"]="xmlhttp";
1318 alexandre_ 2865
}
2866
do{
1422 alexandre_ 2867
if(_2bf.postContent){
2868
_2c1=_2bf.postContent;
1318 alexandre_ 2869
break;
2870
}
1422 alexandre_ 2871
if(_2c4){
2872
_2c1+=dojo.io.argsFromMap(_2c4,_2bf.encoding);
1318 alexandre_ 2873
}
1422 alexandre_ 2874
if(_2bf.method.toLowerCase()=="get"||!_2bf.multipart){
1318 alexandre_ 2875
break;
2876
}
2877
var t=[];
1422 alexandre_ 2878
if(_2c1.length){
2879
var q=_2c1.split("&");
1318 alexandre_ 2880
for(var i=0;i<q.length;++i){
2881
if(q[i].length){
2882
var p=q[i].split("=");
2883
t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+p[0]+"\"","",p[1]);
2884
}
2885
}
2886
}
1422 alexandre_ 2887
if(_2bf.file){
2888
if(dojo.lang.isArray(_2bf.file)){
2889
for(var i=0;i<_2bf.file.length;++i){
2890
var o=_2bf.file[i];
1318 alexandre_ 2891
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);
2892
}
2893
}else{
1422 alexandre_ 2894
var o=_2bf.file;
1318 alexandre_ 2895
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);
2896
}
2897
}
2898
if(t.length){
2899
t.push("--"+this.multipartBoundary+"--","");
1422 alexandre_ 2900
_2c1=t.join("\r\n");
1318 alexandre_ 2901
}
2902
}while(false);
1422 alexandre_ 2903
var _2ca=_2bf["sync"]?false:true;
2904
var _2cb=_2bf["preventCache"]||(this.preventCache==true&&_2bf["preventCache"]!=false);
2905
var _2cc=_2bf["useCache"]==true||(this.useCache==true&&_2bf["useCache"]!=false);
2906
if(!_2cb&&_2cc){
2907
var _2cd=getFromCache(url,_2c1,_2bf.method);
2908
if(_2cd){
2909
doLoad(_2bf,_2cd,url,_2c1,false);
1318 alexandre_ 2910
return;
2911
}
2912
}
1422 alexandre_ 2913
var http=dojo.hostenv.getXmlhttpObject(_2bf);
2914
var _2cf=false;
2915
if(_2ca){
2916
var _2d0=this.inFlight.push({"req":_2bf,"http":http,"url":url,"query":_2c1,"useCache":_2cc,"startTime":_2bf.timeoutSeconds?(new Date()).getTime():0});
1318 alexandre_ 2917
this.startWatchingInFlight();
2918
}else{
1422 alexandre_ 2919
_29e._blockAsync=true;
1318 alexandre_ 2920
}
1422 alexandre_ 2921
if(_2bf.method.toLowerCase()=="post"){
2922
if(!_2bf.user){
2923
http.open("POST",url,_2ca);
1318 alexandre_ 2924
}else{
1422 alexandre_ 2925
http.open("POST",url,_2ca,_2bf.user,_2bf.password);
1318 alexandre_ 2926
}
1422 alexandre_ 2927
setHeaders(http,_2bf);
2928
http.setRequestHeader("Content-Type",_2bf.multipart?("multipart/form-data; boundary="+this.multipartBoundary):(_2bf.contentType||"application/x-www-form-urlencoded"));
1318 alexandre_ 2929
try{
1422 alexandre_ 2930
http.send(_2c1);
1318 alexandre_ 2931
}
2932
catch(e){
2933
if(typeof http.abort=="function"){
2934
http.abort();
2935
}
1422 alexandre_ 2936
doLoad(_2bf,{status:404},url,_2c1,_2cc);
1318 alexandre_ 2937
}
2938
}else{
1422 alexandre_ 2939
var _2d1=url;
2940
if(_2c1!=""){
2941
_2d1+=(_2d1.indexOf("?")>-1?"&":"?")+_2c1;
1318 alexandre_ 2942
}
1422 alexandre_ 2943
if(_2cb){
2944
_2d1+=(dojo.string.endsWithAny(_2d1,"?","&")?"":(_2d1.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf();
1318 alexandre_ 2945
}
1422 alexandre_ 2946
if(!_2bf.user){
2947
http.open(_2bf.method.toUpperCase(),_2d1,_2ca);
1318 alexandre_ 2948
}else{
1422 alexandre_ 2949
http.open(_2bf.method.toUpperCase(),_2d1,_2ca,_2bf.user,_2bf.password);
1318 alexandre_ 2950
}
1422 alexandre_ 2951
setHeaders(http,_2bf);
1318 alexandre_ 2952
try{
2953
http.send(null);
2954
}
2955
catch(e){
2956
if(typeof http.abort=="function"){
2957
http.abort();
2958
}
1422 alexandre_ 2959
doLoad(_2bf,{status:404},url,_2c1,_2cc);
1318 alexandre_ 2960
}
2961
}
1422 alexandre_ 2962
if(!_2ca){
2963
doLoad(_2bf,http,url,_2c1,_2cc);
2964
_29e._blockAsync=false;
1318 alexandre_ 2965
}
1422 alexandre_ 2966
_2bf.abort=function(){
1318 alexandre_ 2967
try{
2968
http._aborted=true;
2969
}
2970
catch(e){
2971
}
2972
return http.abort();
2973
};
2974
return;
2975
};
2976
dojo.io.transports.addTransport("XMLHTTPTransport");
2977
};
2978
}
2979
dojo.provide("dojo.io.cookie");
1422 alexandre_ 2980
dojo.io.cookie.setCookie=function(name,_2d3,days,path,_2d6,_2d7){
2981
var _2d8=-1;
1318 alexandre_ 2982
if((typeof days=="number")&&(days>=0)){
2983
var d=new Date();
2984
d.setTime(d.getTime()+(days*24*60*60*1000));
1422 alexandre_ 2985
_2d8=d.toGMTString();
1318 alexandre_ 2986
}
1422 alexandre_ 2987
_2d3=escape(_2d3);
2988
document.cookie=name+"="+_2d3+";"+(_2d8!=-1?" expires="+_2d8+";":"")+(path?"path="+path:"")+(_2d6?"; domain="+_2d6:"")+(_2d7?"; secure":"");
1318 alexandre_ 2989
};
2990
dojo.io.cookie.set=dojo.io.cookie.setCookie;
2991
dojo.io.cookie.getCookie=function(name){
2992
var idx=document.cookie.lastIndexOf(name+"=");
2993
if(idx==-1){
2994
return null;
2995
}
1422 alexandre_ 2996
var _2dc=document.cookie.substring(idx+name.length+1);
2997
var end=_2dc.indexOf(";");
1318 alexandre_ 2998
if(end==-1){
1422 alexandre_ 2999
end=_2dc.length;
1318 alexandre_ 3000
}
1422 alexandre_ 3001
_2dc=_2dc.substring(0,end);
3002
_2dc=unescape(_2dc);
3003
return _2dc;
1318 alexandre_ 3004
};
3005
dojo.io.cookie.get=dojo.io.cookie.getCookie;
3006
dojo.io.cookie.deleteCookie=function(name){
3007
dojo.io.cookie.setCookie(name,"-",0);
3008
};
1422 alexandre_ 3009
dojo.io.cookie.setObjectCookie=function(name,obj,days,path,_2e3,_2e4,_2e5){
1318 alexandre_ 3010
if(arguments.length==5){
1422 alexandre_ 3011
_2e5=_2e3;
3012
_2e3=null;
3013
_2e4=null;
1318 alexandre_ 3014
}
1422 alexandre_ 3015
var _2e6=[],_2e7,_2e8="";
3016
if(!_2e5){
3017
_2e7=dojo.io.cookie.getObjectCookie(name);
1318 alexandre_ 3018
}
3019
if(days>=0){
1422 alexandre_ 3020
if(!_2e7){
3021
_2e7={};
1318 alexandre_ 3022
}
3023
for(var prop in obj){
3024
if(obj[prop]==null){
1422 alexandre_ 3025
delete _2e7[prop];
1318 alexandre_ 3026
}else{
3027
if((typeof obj[prop]=="string")||(typeof obj[prop]=="number")){
1422 alexandre_ 3028
_2e7[prop]=obj[prop];
1318 alexandre_ 3029
}
3030
}
3031
}
3032
prop=null;
1422 alexandre_ 3033
for(var prop in _2e7){
3034
_2e6.push(escape(prop)+"="+escape(_2e7[prop]));
1318 alexandre_ 3035
}
1422 alexandre_ 3036
_2e8=_2e6.join("&");
1318 alexandre_ 3037
}
1422 alexandre_ 3038
dojo.io.cookie.setCookie(name,_2e8,days,path,_2e3,_2e4);
1318 alexandre_ 3039
};
3040
dojo.io.cookie.getObjectCookie=function(name){
1422 alexandre_ 3041
var _2eb=null,_2ec=dojo.io.cookie.getCookie(name);
3042
if(_2ec){
3043
_2eb={};
3044
var _2ed=_2ec.split("&");
3045
for(var i=0;i<_2ed.length;i++){
3046
var pair=_2ed[i].split("=");
3047
var _2f0=pair[1];
3048
if(isNaN(_2f0)){
3049
_2f0=unescape(pair[1]);
1318 alexandre_ 3050
}
1422 alexandre_ 3051
_2eb[unescape(pair[0])]=_2f0;
1318 alexandre_ 3052
}
3053
}
1422 alexandre_ 3054
return _2eb;
1318 alexandre_ 3055
};
3056
dojo.io.cookie.isSupported=function(){
3057
if(typeof navigator.cookieEnabled!="boolean"){
3058
dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null);
1422 alexandre_ 3059
var _2f1=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");
3060
navigator.cookieEnabled=(_2f1=="CookiesAllowed");
1318 alexandre_ 3061
if(navigator.cookieEnabled){
3062
this.deleteCookie("__TestingYourBrowserForCookieSupport__");
3063
}
3064
}
3065
return navigator.cookieEnabled;
3066
};
3067
if(!dojo.io.cookies){
3068
dojo.io.cookies=dojo.io.cookie;
3069
}
3070
dojo.kwCompoundRequire({common:["dojo.io.common"],rhino:["dojo.io.RhinoIO"],browser:["dojo.io.BrowserIO","dojo.io.cookie"],dashboard:["dojo.io.BrowserIO","dojo.io.cookie"]});
3071
dojo.provide("dojo.io.*");
3072
dojo.provide("dojo.event.common");
3073
dojo.event=new function(){
3074
this._canTimeout=dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]);
1422 alexandre_ 3075
function interpolateArgs(args,_2f3){
1318 alexandre_ 3076
var dl=dojo.lang;
3077
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};
3078
switch(args.length){
3079
case 0:
3080
return;
3081
case 1:
3082
return;
3083
case 2:
3084
ao.srcFunc=args[0];
3085
ao.adviceFunc=args[1];
3086
break;
3087
case 3:
3088
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){
3089
ao.adviceType="after";
3090
ao.srcObj=args[0];
3091
ao.srcFunc=args[1];
3092
ao.adviceFunc=args[2];
3093
}else{
3094
if((dl.isString(args[1]))&&(dl.isString(args[2]))){
3095
ao.srcFunc=args[1];
3096
ao.adviceFunc=args[2];
3097
}else{
3098
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){
3099
ao.adviceType="after";
3100
ao.srcObj=args[0];
3101
ao.srcFunc=args[1];
1422 alexandre_ 3102
var _2f6=dl.nameAnonFunc(args[2],ao.adviceObj,_2f3);
3103
ao.adviceFunc=_2f6;
1318 alexandre_ 3104
}else{
3105
if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){
3106
ao.adviceType="after";
3107
ao.srcObj=dj_global;
1422 alexandre_ 3108
var _2f6=dl.nameAnonFunc(args[0],ao.srcObj,_2f3);
3109
ao.srcFunc=_2f6;
1318 alexandre_ 3110
ao.adviceObj=args[1];
3111
ao.adviceFunc=args[2];
3112
}
3113
}
3114
}
3115
}
3116
break;
3117
case 4:
3118
if((dl.isObject(args[0]))&&(dl.isObject(args[2]))){
3119
ao.adviceType="after";
3120
ao.srcObj=args[0];
3121
ao.srcFunc=args[1];
3122
ao.adviceObj=args[2];
3123
ao.adviceFunc=args[3];
3124
}else{
3125
if((dl.isString(args[0]))&&(dl.isString(args[1]))&&(dl.isObject(args[2]))){
3126
ao.adviceType=args[0];
3127
ao.srcObj=dj_global;
3128
ao.srcFunc=args[1];
3129
ao.adviceObj=args[2];
3130
ao.adviceFunc=args[3];
3131
}else{
3132
if((dl.isString(args[0]))&&(dl.isFunction(args[1]))&&(dl.isObject(args[2]))){
3133
ao.adviceType=args[0];
3134
ao.srcObj=dj_global;
1422 alexandre_ 3135
var _2f6=dl.nameAnonFunc(args[1],dj_global,_2f3);
3136
ao.srcFunc=_2f6;
1318 alexandre_ 3137
ao.adviceObj=args[2];
3138
ao.adviceFunc=args[3];
3139
}else{
3140
if((dl.isString(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))&&(dl.isFunction(args[3]))){
3141
ao.srcObj=args[1];
3142
ao.srcFunc=args[2];
1422 alexandre_ 3143
var _2f6=dl.nameAnonFunc(args[3],dj_global,_2f3);
1318 alexandre_ 3144
ao.adviceObj=dj_global;
1422 alexandre_ 3145
ao.adviceFunc=_2f6;
1318 alexandre_ 3146
}else{
3147
if(dl.isObject(args[1])){
3148
ao.srcObj=args[1];
3149
ao.srcFunc=args[2];
3150
ao.adviceObj=dj_global;
3151
ao.adviceFunc=args[3];
3152
}else{
3153
if(dl.isObject(args[2])){
3154
ao.srcObj=dj_global;
3155
ao.srcFunc=args[1];
3156
ao.adviceObj=args[2];
3157
ao.adviceFunc=args[3];
3158
}else{
3159
ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global;
3160
ao.srcFunc=args[1];
3161
ao.adviceFunc=args[2];
3162
ao.aroundFunc=args[3];
3163
}
3164
}
3165
}
3166
}
3167
}
3168
}
3169
break;
3170
case 6:
3171
ao.srcObj=args[1];
3172
ao.srcFunc=args[2];
3173
ao.adviceObj=args[3];
3174
ao.adviceFunc=args[4];
3175
ao.aroundFunc=args[5];
3176
ao.aroundObj=dj_global;
3177
break;
3178
default:
3179
ao.srcObj=args[1];
3180
ao.srcFunc=args[2];
3181
ao.adviceObj=args[3];
3182
ao.adviceFunc=args[4];
3183
ao.aroundObj=args[5];
3184
ao.aroundFunc=args[6];
3185
ao.once=args[7];
3186
ao.delay=args[8];
3187
ao.rate=args[9];
3188
ao.adviceMsg=args[10];
3189
ao.maxCalls=(!isNaN(parseInt(args[11])))?args[11]:-1;
3190
break;
3191
}
3192
if(dl.isFunction(ao.aroundFunc)){
1422 alexandre_ 3193
var _2f6=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_2f3);
3194
ao.aroundFunc=_2f6;
1318 alexandre_ 3195
}
3196
if(dl.isFunction(ao.srcFunc)){
3197
ao.srcFunc=dl.getNameInObj(ao.srcObj,ao.srcFunc);
3198
}
3199
if(dl.isFunction(ao.adviceFunc)){
3200
ao.adviceFunc=dl.getNameInObj(ao.adviceObj,ao.adviceFunc);
3201
}
3202
if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){
3203
ao.aroundFunc=dl.getNameInObj(ao.aroundObj,ao.aroundFunc);
3204
}
3205
if(!ao.srcObj){
3206
dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc);
3207
}
3208
if(!ao.adviceObj){
3209
dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc);
3210
}
3211
if(!ao.adviceFunc){
3212
dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc);
3213
dojo.debugShallow(ao);
3214
}
3215
return ao;
3216
}
3217
this.connect=function(){
3218
if(arguments.length==1){
3219
var ao=arguments[0];
3220
}else{
3221
var ao=interpolateArgs(arguments,true);
3222
}
1422 alexandre_ 3223
if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){
3224
if(dojo.render.html.ie){
3225
ao.srcFunc="onkeydown";
3226
this.connect(ao);
3227
}
3228
ao.srcFunc="onkeypress";
3229
}
1318 alexandre_ 3230
if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!=""){
1422 alexandre_ 3231
var _2f8={};
1318 alexandre_ 3232
for(var x in ao){
1422 alexandre_ 3233
_2f8[x]=ao[x];
1318 alexandre_ 3234
}
3235
var mjps=[];
3236
dojo.lang.forEach(ao.srcObj,function(src){
3237
if((dojo.render.html.capable)&&(dojo.lang.isString(src))){
3238
src=dojo.byId(src);
3239
}
1422 alexandre_ 3240
_2f8.srcObj=src;
3241
mjps.push(dojo.event.connect.call(dojo.event,_2f8));
1318 alexandre_ 3242
});
3243
return mjps;
3244
}
3245
var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc);
3246
if(ao.adviceFunc){
3247
var mjp2=dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj,ao.adviceFunc);
3248
}
3249
mjp.kwAddAdvice(ao);
3250
return mjp;
3251
};
3252
this.log=function(a1,a2){
1422 alexandre_ 3253
var _300;
1318 alexandre_ 3254
if((arguments.length==1)&&(typeof a1=="object")){
1422 alexandre_ 3255
_300=a1;
1318 alexandre_ 3256
}else{
1422 alexandre_ 3257
_300={srcObj:a1,srcFunc:a2};
1318 alexandre_ 3258
}
1422 alexandre_ 3259
_300.adviceFunc=function(){
3260
var _301=[];
1318 alexandre_ 3261
for(var x=0;x<arguments.length;x++){
1422 alexandre_ 3262
_301.push(arguments[x]);
1318 alexandre_ 3263
}
1422 alexandre_ 3264
dojo.debug("("+_300.srcObj+")."+_300.srcFunc,":",_301.join(", "));
1318 alexandre_ 3265
};
1422 alexandre_ 3266
this.kwConnect(_300);
1318 alexandre_ 3267
};
3268
this.connectBefore=function(){
3269
var args=["before"];
3270
for(var i=0;i<arguments.length;i++){
3271
args.push(arguments[i]);
3272
}
3273
return this.connect.apply(this,args);
3274
};
3275
this.connectAround=function(){
3276
var args=["around"];
3277
for(var i=0;i<arguments.length;i++){
3278
args.push(arguments[i]);
3279
}
3280
return this.connect.apply(this,args);
3281
};
3282
this.connectOnce=function(){
3283
var ao=interpolateArgs(arguments,true);
3284
ao.once=true;
3285
return this.connect(ao);
3286
};
3287
this.connectRunOnce=function(){
3288
var ao=interpolateArgs(arguments,true);
3289
ao.maxCalls=1;
3290
return this.connect(ao);
3291
};
1422 alexandre_ 3292
this._kwConnectImpl=function(_309,_30a){
3293
var fn=(_30a)?"disconnect":"connect";
3294
if(typeof _309["srcFunc"]=="function"){
3295
_309.srcObj=_309["srcObj"]||dj_global;
3296
var _30c=dojo.lang.nameAnonFunc(_309.srcFunc,_309.srcObj,true);
3297
_309.srcFunc=_30c;
1318 alexandre_ 3298
}
1422 alexandre_ 3299
if(typeof _309["adviceFunc"]=="function"){
3300
_309.adviceObj=_309["adviceObj"]||dj_global;
3301
var _30c=dojo.lang.nameAnonFunc(_309.adviceFunc,_309.adviceObj,true);
3302
_309.adviceFunc=_30c;
1318 alexandre_ 3303
}
1422 alexandre_ 3304
_309.srcObj=_309["srcObj"]||dj_global;
3305
_309.adviceObj=_309["adviceObj"]||_309["targetObj"]||dj_global;
3306
_309.adviceFunc=_309["adviceFunc"]||_309["targetFunc"];
3307
return dojo.event[fn](_309);
1318 alexandre_ 3308
};
1422 alexandre_ 3309
this.kwConnect=function(_30d){
3310
return this._kwConnectImpl(_30d,false);
1318 alexandre_ 3311
};
3312
this.disconnect=function(){
3313
if(arguments.length==1){
3314
var ao=arguments[0];
3315
}else{
3316
var ao=interpolateArgs(arguments,true);
3317
}
3318
if(!ao.adviceFunc){
3319
return;
3320
}
3321
if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){
3322
if(dojo.render.html.ie){
3323
ao.srcFunc="onkeydown";
3324
this.disconnect(ao);
3325
}
3326
ao.srcFunc="onkeypress";
3327
}
3328
if(!ao.srcObj[ao.srcFunc]){
3329
return null;
3330
}
3331
var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc,true);
3332
mjp.removeAdvice(ao.adviceObj,ao.adviceFunc,ao.adviceType,ao.once);
3333
return mjp;
3334
};
1422 alexandre_ 3335
this.kwDisconnect=function(_310){
3336
return this._kwConnectImpl(_310,true);
1318 alexandre_ 3337
};
3338
};
1422 alexandre_ 3339
dojo.event.MethodInvocation=function(_311,obj,args){
3340
this.jp_=_311;
1318 alexandre_ 3341
this.object=obj;
3342
this.args=[];
3343
for(var x=0;x<args.length;x++){
3344
this.args[x]=args[x];
3345
}
3346
this.around_index=-1;
3347
};
3348
dojo.event.MethodInvocation.prototype.proceed=function(){
3349
this.around_index++;
3350
if(this.around_index>=this.jp_.around.length){
3351
return this.jp_.object[this.jp_.methodname].apply(this.jp_.object,this.args);
3352
}else{
3353
var ti=this.jp_.around[this.around_index];
3354
var mobj=ti[0]||dj_global;
3355
var meth=ti[1];
3356
return mobj[meth].call(mobj,this);
3357
}
3358
};
1422 alexandre_ 3359
dojo.event.MethodJoinPoint=function(obj,_319){
1318 alexandre_ 3360
this.object=obj||dj_global;
1422 alexandre_ 3361
this.methodname=_319;
3362
this.methodfunc=this.object[_319];
1318 alexandre_ 3363
this.squelch=false;
3364
};
1422 alexandre_ 3365
dojo.event.MethodJoinPoint.getForMethod=function(obj,_31b){
1318 alexandre_ 3366
if(!obj){
3367
obj=dj_global;
3368
}
1422 alexandre_ 3369
var ofn=obj[_31b];
1318 alexandre_ 3370
if(!ofn){
1422 alexandre_ 3371
ofn=obj[_31b]=function(){
1318 alexandre_ 3372
};
1422 alexandre_ 3373
if(!obj[_31b]){
3374
dojo.raise("Cannot set do-nothing method on that object "+_31b);
1318 alexandre_ 3375
}
3376
}else{
3377
if((typeof ofn!="function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){
3378
return null;
3379
}
3380
}
1422 alexandre_ 3381
var _31d=_31b+"$joinpoint";
3382
var _31e=_31b+"$joinpoint$method";
3383
var _31f=obj[_31d];
3384
if(!_31f){
3385
var _320=false;
1318 alexandre_ 3386
if(dojo.event["browser"]){
3387
if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){
1422 alexandre_ 3388
_320=true;
3389
dojo.event.browser.addClobberNodeAttrs(obj,[_31d,_31e,_31b]);
1318 alexandre_ 3390
}
3391
}
1422 alexandre_ 3392
var _321=ofn.length;
3393
obj[_31e]=ofn;
3394
_31f=obj[_31d]=new dojo.event.MethodJoinPoint(obj,_31e);
3395
if(!_320){
3396
obj[_31b]=function(){
3397
return _31f.run.apply(_31f,arguments);
1318 alexandre_ 3398
};
3399
}else{
1422 alexandre_ 3400
obj[_31b]=function(){
1318 alexandre_ 3401
var args=[];
3402
if(!arguments.length){
3403
var evt=null;
3404
try{
3405
if(obj.ownerDocument){
3406
evt=obj.ownerDocument.parentWindow.event;
3407
}else{
3408
if(obj.documentElement){
3409
evt=obj.documentElement.ownerDocument.parentWindow.event;
3410
}else{
3411
if(obj.event){
3412
evt=obj.event;
3413
}else{
3414
evt=window.event;
3415
}
3416
}
3417
}
3418
}
3419
catch(e){
3420
evt=window.event;
3421
}
3422
if(evt){
3423
args.push(dojo.event.browser.fixEvent(evt,this));
3424
}
3425
}else{
3426
for(var x=0;x<arguments.length;x++){
3427
if((x==0)&&(dojo.event.browser.isEvent(arguments[x]))){
3428
args.push(dojo.event.browser.fixEvent(arguments[x],this));
3429
}else{
3430
args.push(arguments[x]);
3431
}
3432
}
3433
}
1422 alexandre_ 3434
return _31f.run.apply(_31f,args);
1318 alexandre_ 3435
};
3436
}
1422 alexandre_ 3437
obj[_31b].__preJoinArity=_321;
1318 alexandre_ 3438
}
1422 alexandre_ 3439
return _31f;
1318 alexandre_ 3440
};
3441
dojo.lang.extend(dojo.event.MethodJoinPoint,{squelch:false,unintercept:function(){
3442
this.object[this.methodname]=this.methodfunc;
3443
this.before=[];
3444
this.after=[];
3445
this.around=[];
3446
},disconnect:dojo.lang.forward("unintercept"),run:function(){
3447
var obj=this.object||dj_global;
3448
var args=arguments;
1422 alexandre_ 3449
var _327=[];
1318 alexandre_ 3450
for(var x=0;x<args.length;x++){
1422 alexandre_ 3451
_327[x]=args[x];
1318 alexandre_ 3452
}
1422 alexandre_ 3453
var _329=function(marr){
1318 alexandre_ 3454
if(!marr){
3455
dojo.debug("Null argument to unrollAdvice()");
3456
return;
3457
}
1422 alexandre_ 3458
var _32b=marr[0]||dj_global;
3459
var _32c=marr[1];
3460
if(!_32b[_32c]){
3461
dojo.raise("function \""+_32c+"\" does not exist on \""+_32b+"\"");
1318 alexandre_ 3462
}
1422 alexandre_ 3463
var _32d=marr[2]||dj_global;
3464
var _32e=marr[3];
1318 alexandre_ 3465
var msg=marr[6];
1422 alexandre_ 3466
var _330=marr[7];
3467
if(_330>-1){
3468
if(_330==0){
1318 alexandre_ 3469
return;
3470
}
3471
marr[7]--;
3472
}
1422 alexandre_ 3473
var _331;
1318 alexandre_ 3474
var to={args:[],jp_:this,object:obj,proceed:function(){
1422 alexandre_ 3475
return _32b[_32c].apply(_32b,to.args);
1318 alexandre_ 3476
}};
1422 alexandre_ 3477
to.args=_327;
3478
var _333=parseInt(marr[4]);
3479
var _334=((!isNaN(_333))&&(marr[4]!==null)&&(typeof marr[4]!="undefined"));
1318 alexandre_ 3480
if(marr[5]){
3481
var rate=parseInt(marr[5]);
3482
var cur=new Date();
1422 alexandre_ 3483
var _337=false;
1318 alexandre_ 3484
if((marr["last"])&&((cur-marr.last)<=rate)){
3485
if(dojo.event._canTimeout){
3486
if(marr["delayTimer"]){
3487
clearTimeout(marr.delayTimer);
3488
}
3489
var tod=parseInt(rate*2);
3490
var mcpy=dojo.lang.shallowCopy(marr);
3491
marr.delayTimer=setTimeout(function(){
3492
mcpy[5]=0;
1422 alexandre_ 3493
_329(mcpy);
1318 alexandre_ 3494
},tod);
3495
}
3496
return;
3497
}else{
3498
marr.last=cur;
3499
}
3500
}
1422 alexandre_ 3501
if(_32e){
3502
_32d[_32e].call(_32d,to);
1318 alexandre_ 3503
}else{
1422 alexandre_ 3504
if((_334)&&((dojo.render.html)||(dojo.render.svg))){
1318 alexandre_ 3505
dj_global["setTimeout"](function(){
3506
if(msg){
1422 alexandre_ 3507
_32b[_32c].call(_32b,to);
1318 alexandre_ 3508
}else{
1422 alexandre_ 3509
_32b[_32c].apply(_32b,args);
1318 alexandre_ 3510
}
1422 alexandre_ 3511
},_333);
1318 alexandre_ 3512
}else{
3513
if(msg){
1422 alexandre_ 3514
_32b[_32c].call(_32b,to);
1318 alexandre_ 3515
}else{
1422 alexandre_ 3516
_32b[_32c].apply(_32b,args);
1318 alexandre_ 3517
}
3518
}
3519
}
3520
};
1422 alexandre_ 3521
var _33a=function(){
1318 alexandre_ 3522
if(this.squelch){
3523
try{
1422 alexandre_ 3524
return _329.apply(this,arguments);
1318 alexandre_ 3525
}
3526
catch(e){
3527
dojo.debug(e);
3528
}
3529
}else{
1422 alexandre_ 3530
return _329.apply(this,arguments);
1318 alexandre_ 3531
}
3532
};
3533
if((this["before"])&&(this.before.length>0)){
1422 alexandre_ 3534
dojo.lang.forEach(this.before.concat(new Array()),_33a);
1318 alexandre_ 3535
}
1422 alexandre_ 3536
var _33b;
1318 alexandre_ 3537
try{
3538
if((this["around"])&&(this.around.length>0)){
3539
var mi=new dojo.event.MethodInvocation(this,obj,args);
1422 alexandre_ 3540
_33b=mi.proceed();
1318 alexandre_ 3541
}else{
3542
if(this.methodfunc){
1422 alexandre_ 3543
_33b=this.object[this.methodname].apply(this.object,args);
1318 alexandre_ 3544
}
3545
}
3546
}
3547
catch(e){
3548
if(!this.squelch){
3549
dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",args);
3550
dojo.raise(e);
3551
}
3552
}
3553
if((this["after"])&&(this.after.length>0)){
1422 alexandre_ 3554
dojo.lang.forEach(this.after.concat(new Array()),_33a);
1318 alexandre_ 3555
}
1422 alexandre_ 3556
return (this.methodfunc)?_33b:null;
1318 alexandre_ 3557
},getArr:function(kind){
3558
var type="after";
3559
if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){
3560
type="before";
3561
}else{
3562
if(kind=="around"){
3563
type="around";
3564
}
3565
}
3566
if(!this[type]){
3567
this[type]=[];
3568
}
3569
return this[type];
3570
},kwAddAdvice:function(args){
3571
this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"],args["maxCalls"]);
1422 alexandre_ 3572
},addAdvice:function(_340,_341,_342,_343,_344,_345,once,_347,rate,_349,_34a){
3573
var arr=this.getArr(_344);
1318 alexandre_ 3574
if(!arr){
3575
dojo.raise("bad this: "+this);
3576
}
1422 alexandre_ 3577
var ao=[_340,_341,_342,_343,_347,rate,_349,_34a];
1318 alexandre_ 3578
if(once){
1422 alexandre_ 3579
if(this.hasAdvice(_340,_341,_344,arr)>=0){
1318 alexandre_ 3580
return;
3581
}
3582
}
1422 alexandre_ 3583
if(_345=="first"){
1318 alexandre_ 3584
arr.unshift(ao);
3585
}else{
3586
arr.push(ao);
3587
}
1422 alexandre_ 3588
},hasAdvice:function(_34d,_34e,_34f,arr){
1318 alexandre_ 3589
if(!arr){
1422 alexandre_ 3590
arr=this.getArr(_34f);
1318 alexandre_ 3591
}
3592
var ind=-1;
3593
for(var x=0;x<arr.length;x++){
1422 alexandre_ 3594
var aao=(typeof _34e=="object")?(new String(_34e)).toString():_34e;
1318 alexandre_ 3595
var a1o=(typeof arr[x][1]=="object")?(new String(arr[x][1])).toString():arr[x][1];
1422 alexandre_ 3596
if((arr[x][0]==_34d)&&(a1o==aao)){
1318 alexandre_ 3597
ind=x;
3598
}
3599
}
3600
return ind;
1422 alexandre_ 3601
},removeAdvice:function(_355,_356,_357,once){
3602
var arr=this.getArr(_357);
3603
var ind=this.hasAdvice(_355,_356,_357,arr);
1318 alexandre_ 3604
if(ind==-1){
3605
return false;
3606
}
3607
while(ind!=-1){
3608
arr.splice(ind,1);
3609
if(once){
3610
break;
3611
}
1422 alexandre_ 3612
ind=this.hasAdvice(_355,_356,_357,arr);
1318 alexandre_ 3613
}
3614
return true;
3615
}});
3616
dojo.provide("dojo.event.topic");
3617
dojo.event.topic=new function(){
3618
this.topics={};
1422 alexandre_ 3619
this.getTopic=function(_35b){
3620
if(!this.topics[_35b]){
3621
this.topics[_35b]=new this.TopicImpl(_35b);
1318 alexandre_ 3622
}
1422 alexandre_ 3623
return this.topics[_35b];
1318 alexandre_ 3624
};
1422 alexandre_ 3625
this.registerPublisher=function(_35c,obj,_35e){
3626
var _35c=this.getTopic(_35c);
3627
_35c.registerPublisher(obj,_35e);
1318 alexandre_ 3628
};
1422 alexandre_ 3629
this.subscribe=function(_35f,obj,_361){
3630
var _35f=this.getTopic(_35f);
3631
_35f.subscribe(obj,_361);
1318 alexandre_ 3632
};
1422 alexandre_ 3633
this.unsubscribe=function(_362,obj,_364){
3634
var _362=this.getTopic(_362);
3635
_362.unsubscribe(obj,_364);
1318 alexandre_ 3636
};
1422 alexandre_ 3637
this.destroy=function(_365){
3638
this.getTopic(_365).destroy();
3639
delete this.topics[_365];
1318 alexandre_ 3640
};
1422 alexandre_ 3641
this.publishApply=function(_366,args){
3642
var _366=this.getTopic(_366);
3643
_366.sendMessage.apply(_366,args);
1318 alexandre_ 3644
};
1422 alexandre_ 3645
this.publish=function(_368,_369){
3646
var _368=this.getTopic(_368);
1318 alexandre_ 3647
var args=[];
3648
for(var x=1;x<arguments.length;x++){
3649
args.push(arguments[x]);
3650
}
1422 alexandre_ 3651
_368.sendMessage.apply(_368,args);
1318 alexandre_ 3652
};
3653
};
1422 alexandre_ 3654
dojo.event.topic.TopicImpl=function(_36c){
3655
this.topicName=_36c;
3656
this.subscribe=function(_36d,_36e){
3657
var tf=_36e||_36d;
3658
var to=(!_36e)?dj_global:_36d;
1318 alexandre_ 3659
return dojo.event.kwConnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
3660
};
1422 alexandre_ 3661
this.unsubscribe=function(_371,_372){
3662
var tf=(!_372)?_371:_372;
3663
var to=(!_372)?null:_371;
1318 alexandre_ 3664
return dojo.event.kwDisconnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
3665
};
3666
this._getJoinPoint=function(){
3667
return dojo.event.MethodJoinPoint.getForMethod(this,"sendMessage");
3668
};
1422 alexandre_ 3669
this.setSquelch=function(_375){
3670
this._getJoinPoint().squelch=_375;
1318 alexandre_ 3671
};
3672
this.destroy=function(){
3673
this._getJoinPoint().disconnect();
3674
};
1422 alexandre_ 3675
this.registerPublisher=function(_376,_377){
3676
dojo.event.connect(_376,_377,this,"sendMessage");
1318 alexandre_ 3677
};
1422 alexandre_ 3678
this.sendMessage=function(_378){
1318 alexandre_ 3679
};
3680
};
3681
dojo.provide("dojo.event.browser");
3682
dojo._ie_clobber=new function(){
3683
this.clobberNodes=[];
3684
function nukeProp(node,prop){
3685
try{
3686
node[prop]=null;
3687
}
3688
catch(e){
3689
}
3690
try{
3691
delete node[prop];
3692
}
3693
catch(e){
3694
}
3695
try{
3696
node.removeAttribute(prop);
3697
}
3698
catch(e){
3699
}
3700
}
1422 alexandre_ 3701
this.clobber=function(_37b){
1318 alexandre_ 3702
var na;
3703
var tna;
1422 alexandre_ 3704
if(_37b){
3705
tna=_37b.all||_37b.getElementsByTagName("*");
3706
na=[_37b];
1318 alexandre_ 3707
for(var x=0;x<tna.length;x++){
3708
if(tna[x]["__doClobber__"]){
3709
na.push(tna[x]);
3710
}
3711
}
3712
}else{
3713
try{
3714
window.onload=null;
3715
}
3716
catch(e){
3717
}
3718
na=(this.clobberNodes.length)?this.clobberNodes:document.all;
3719
}
3720
tna=null;
1422 alexandre_ 3721
var _37f={};
1318 alexandre_ 3722
for(var i=na.length-1;i>=0;i=i-1){
3723
var el=na[i];
3724
try{
3725
if(el&&el["__clobberAttrs__"]){
3726
for(var j=0;j<el.__clobberAttrs__.length;j++){
3727
nukeProp(el,el.__clobberAttrs__[j]);
3728
}
3729
nukeProp(el,"__clobberAttrs__");
3730
nukeProp(el,"__doClobber__");
3731
}
3732
}
3733
catch(e){
3734
}
3735
}
3736
na=null;
3737
};
3738
};
3739
if(dojo.render.html.ie){
3740
dojo.addOnUnload(function(){
3741
dojo._ie_clobber.clobber();
3742
try{
3743
if((dojo["widget"])&&(dojo.widget["manager"])){
3744
dojo.widget.manager.destroyAll();
3745
}
3746
}
3747
catch(e){
3748
}
3749
if(dojo.widget){
3750
for(var name in dojo.widget._templateCache){
3751
if(dojo.widget._templateCache[name].node){
3752
dojo.dom.destroyNode(dojo.widget._templateCache[name].node);
3753
dojo.widget._templateCache[name].node=null;
3754
delete dojo.widget._templateCache[name].node;
3755
}
3756
}
3757
}
3758
try{
3759
window.onload=null;
3760
}
3761
catch(e){
3762
}
3763
try{
3764
window.onunload=null;
3765
}
3766
catch(e){
3767
}
3768
dojo._ie_clobber.clobberNodes=[];
3769
});
3770
}
3771
dojo.event.browser=new function(){
1422 alexandre_ 3772
var _384=0;
3773
this.normalizedEventName=function(_385){
3774
switch(_385){
1318 alexandre_ 3775
case "CheckboxStateChange":
3776
case "DOMAttrModified":
3777
case "DOMMenuItemActive":
3778
case "DOMMenuItemInactive":
3779
case "DOMMouseScroll":
3780
case "DOMNodeInserted":
3781
case "DOMNodeRemoved":
3782
case "RadioStateChange":
1422 alexandre_ 3783
return _385;
1318 alexandre_ 3784
break;
3785
default:
1422 alexandre_ 3786
var lcn=_385.toLowerCase();
1318 alexandre_ 3787
return (lcn.indexOf("on")==0)?lcn.substr(2):lcn;
3788
break;
3789
}
3790
};
3791
this.clean=function(node){
3792
if(dojo.render.html.ie){
3793
dojo._ie_clobber.clobber(node);
3794
}
3795
};
3796
this.addClobberNode=function(node){
3797
if(!dojo.render.html.ie){
3798
return;
3799
}
3800
if(!node["__doClobber__"]){
3801
node.__doClobber__=true;
3802
dojo._ie_clobber.clobberNodes.push(node);
3803
node.__clobberAttrs__=[];
3804
}
3805
};
1422 alexandre_ 3806
this.addClobberNodeAttrs=function(node,_38a){
1318 alexandre_ 3807
if(!dojo.render.html.ie){
3808
return;
3809
}
3810
this.addClobberNode(node);
1422 alexandre_ 3811
for(var x=0;x<_38a.length;x++){
3812
node.__clobberAttrs__.push(_38a[x]);
1318 alexandre_ 3813
}
3814
};
1422 alexandre_ 3815
this.removeListener=function(node,_38d,fp,_38f){
3816
if(!_38f){
3817
var _38f=false;
1318 alexandre_ 3818
}
1422 alexandre_ 3819
_38d=dojo.event.browser.normalizedEventName(_38d);
3820
if(_38d=="key"){
1318 alexandre_ 3821
if(dojo.render.html.ie){
1422 alexandre_ 3822
this.removeListener(node,"onkeydown",fp,_38f);
1318 alexandre_ 3823
}
1422 alexandre_ 3824
_38d="keypress";
1318 alexandre_ 3825
}
3826
if(node.removeEventListener){
1422 alexandre_ 3827
node.removeEventListener(_38d,fp,_38f);
1318 alexandre_ 3828
}
3829
};
1422 alexandre_ 3830
this.addListener=function(node,_391,fp,_393,_394){
1318 alexandre_ 3831
if(!node){
3832
return;
3833
}
1422 alexandre_ 3834
if(!_393){
3835
var _393=false;
1318 alexandre_ 3836
}
1422 alexandre_ 3837
_391=dojo.event.browser.normalizedEventName(_391);
3838
if(_391=="key"){
1318 alexandre_ 3839
if(dojo.render.html.ie){
1422 alexandre_ 3840
this.addListener(node,"onkeydown",fp,_393,_394);
1318 alexandre_ 3841
}
1422 alexandre_ 3842
_391="keypress";
1318 alexandre_ 3843
}
1422 alexandre_ 3844
if(!_394){
3845
var _395=function(evt){
1318 alexandre_ 3846
if(!evt){
3847
evt=window.event;
3848
}
3849
var ret=fp(dojo.event.browser.fixEvent(evt,this));
1422 alexandre_ 3850
if(_393){
1318 alexandre_ 3851
dojo.event.browser.stopEvent(evt);
3852
}
3853
return ret;
3854
};
3855
}else{
1422 alexandre_ 3856
_395=fp;
1318 alexandre_ 3857
}
3858
if(node.addEventListener){
1422 alexandre_ 3859
node.addEventListener(_391,_395,_393);
3860
return _395;
1318 alexandre_ 3861
}else{
1422 alexandre_ 3862
_391="on"+_391;
3863
if(typeof node[_391]=="function"){
3864
var _398=node[_391];
3865
node[_391]=function(e){
3866
_398(e);
3867
return _395(e);
1318 alexandre_ 3868
};
3869
}else{
1422 alexandre_ 3870
node[_391]=_395;
1318 alexandre_ 3871
}
3872
if(dojo.render.html.ie){
1422 alexandre_ 3873
this.addClobberNodeAttrs(node,[_391]);
1318 alexandre_ 3874
}
1422 alexandre_ 3875
return _395;
1318 alexandre_ 3876
}
3877
};
3878
this.isEvent=function(obj){
3879
return (typeof obj!="undefined")&&(obj)&&(typeof Event!="undefined")&&(obj.eventPhase);
3880
};
3881
this.currentEvent=null;
1422 alexandre_ 3882
this.callListener=function(_39b,_39c){
3883
if(typeof _39b!="function"){
3884
dojo.raise("listener not a function: "+_39b);
1318 alexandre_ 3885
}
1422 alexandre_ 3886
dojo.event.browser.currentEvent.currentTarget=_39c;
3887
return _39b.call(_39c,dojo.event.browser.currentEvent);
1318 alexandre_ 3888
};
3889
this._stopPropagation=function(){
3890
dojo.event.browser.currentEvent.cancelBubble=true;
3891
};
3892
this._preventDefault=function(){
3893
dojo.event.browser.currentEvent.returnValue=false;
3894
};
3895
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};
3896
this.revKeys=[];
3897
for(var key in this.keys){
3898
this.revKeys[this.keys[key]]=key;
3899
}
1422 alexandre_ 3900
this.fixEvent=function(evt,_39f){
1318 alexandre_ 3901
if(!evt){
3902
if(window["event"]){
3903
evt=window.event;
3904
}
3905
}
3906
if((evt["type"])&&(evt["type"].indexOf("key")==0)){
3907
evt.keys=this.revKeys;
3908
for(var key in this.keys){
3909
evt[key]=this.keys[key];
3910
}
3911
if(evt["type"]=="keydown"&&dojo.render.html.ie){
3912
switch(evt.keyCode){
3913
case evt.KEY_SHIFT:
3914
case evt.KEY_CTRL:
3915
case evt.KEY_ALT:
3916
case evt.KEY_CAPS_LOCK:
3917
case evt.KEY_LEFT_WINDOW:
3918
case evt.KEY_RIGHT_WINDOW:
3919
case evt.KEY_SELECT:
3920
case evt.KEY_NUM_LOCK:
3921
case evt.KEY_SCROLL_LOCK:
3922
case evt.KEY_NUMPAD_0:
3923
case evt.KEY_NUMPAD_1:
3924
case evt.KEY_NUMPAD_2:
3925
case evt.KEY_NUMPAD_3:
3926
case evt.KEY_NUMPAD_4:
3927
case evt.KEY_NUMPAD_5:
3928
case evt.KEY_NUMPAD_6:
3929
case evt.KEY_NUMPAD_7:
3930
case evt.KEY_NUMPAD_8:
3931
case evt.KEY_NUMPAD_9:
3932
case evt.KEY_NUMPAD_PERIOD:
3933
break;
3934
case evt.KEY_NUMPAD_MULTIPLY:
3935
case evt.KEY_NUMPAD_PLUS:
3936
case evt.KEY_NUMPAD_ENTER:
3937
case evt.KEY_NUMPAD_MINUS:
3938
case evt.KEY_NUMPAD_DIVIDE:
3939
break;
3940
case evt.KEY_PAUSE:
3941
case evt.KEY_TAB:
3942
case evt.KEY_BACKSPACE:
3943
case evt.KEY_ENTER:
3944
case evt.KEY_ESCAPE:
3945
case evt.KEY_PAGE_UP:
3946
case evt.KEY_PAGE_DOWN:
3947
case evt.KEY_END:
3948
case evt.KEY_HOME:
3949
case evt.KEY_LEFT_ARROW:
3950
case evt.KEY_UP_ARROW:
3951
case evt.KEY_RIGHT_ARROW:
3952
case evt.KEY_DOWN_ARROW:
3953
case evt.KEY_INSERT:
3954
case evt.KEY_DELETE:
3955
case evt.KEY_F1:
3956
case evt.KEY_F2:
3957
case evt.KEY_F3:
3958
case evt.KEY_F4:
3959
case evt.KEY_F5:
3960
case evt.KEY_F6:
3961
case evt.KEY_F7:
3962
case evt.KEY_F8:
3963
case evt.KEY_F9:
3964
case evt.KEY_F10:
3965
case evt.KEY_F11:
3966
case evt.KEY_F12:
3967
case evt.KEY_F12:
3968
case evt.KEY_F13:
3969
case evt.KEY_F14:
3970
case evt.KEY_F15:
3971
case evt.KEY_CLEAR:
3972
case evt.KEY_HELP:
3973
evt.key=evt.keyCode;
3974
break;
3975
default:
3976
if(evt.ctrlKey||evt.altKey){
1422 alexandre_ 3977
var _3a1=evt.keyCode;
3978
if(_3a1>=65&&_3a1<=90&&evt.shiftKey==false){
3979
_3a1+=32;
1318 alexandre_ 3980
}
1422 alexandre_ 3981
if(_3a1>=1&&_3a1<=26&&evt.ctrlKey){
3982
_3a1+=96;
1318 alexandre_ 3983
}
1422 alexandre_ 3984
evt.key=String.fromCharCode(_3a1);
1318 alexandre_ 3985
}
3986
}
3987
}else{
3988
if(evt["type"]=="keypress"){
3989
if(dojo.render.html.opera){
3990
if(evt.which==0){
3991
evt.key=evt.keyCode;
3992
}else{
3993
if(evt.which>0){
3994
switch(evt.which){
3995
case evt.KEY_SHIFT:
3996
case evt.KEY_CTRL:
3997
case evt.KEY_ALT:
3998
case evt.KEY_CAPS_LOCK:
3999
case evt.KEY_NUM_LOCK:
4000
case evt.KEY_SCROLL_LOCK:
4001
break;
4002
case evt.KEY_PAUSE:
4003
case evt.KEY_TAB:
4004
case evt.KEY_BACKSPACE:
4005
case evt.KEY_ENTER:
4006
case evt.KEY_ESCAPE:
4007
evt.key=evt.which;
4008
break;
4009
default:
1422 alexandre_ 4010
var _3a1=evt.which;
1318 alexandre_ 4011
if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){
1422 alexandre_ 4012
_3a1+=32;
1318 alexandre_ 4013
}
1422 alexandre_ 4014
evt.key=String.fromCharCode(_3a1);
1318 alexandre_ 4015
}
4016
}
4017
}
4018
}else{
4019
if(dojo.render.html.ie){
4020
if(!evt.ctrlKey&&!evt.altKey&&evt.keyCode>=evt.KEY_SPACE){
4021
evt.key=String.fromCharCode(evt.keyCode);
4022
}
4023
}else{
4024
if(dojo.render.html.safari){
4025
switch(evt.keyCode){
4026
case 25:
4027
evt.key=evt.KEY_TAB;
4028
evt.shift=true;
4029
break;
4030
case 63232:
4031
evt.key=evt.KEY_UP_ARROW;
4032
break;
4033
case 63233:
4034
evt.key=evt.KEY_DOWN_ARROW;
4035
break;
4036
case 63234:
4037
evt.key=evt.KEY_LEFT_ARROW;
4038
break;
4039
case 63235:
4040
evt.key=evt.KEY_RIGHT_ARROW;
4041
break;
4042
case 63236:
4043
evt.key=evt.KEY_F1;
4044
break;
4045
case 63237:
4046
evt.key=evt.KEY_F2;
4047
break;
4048
case 63238:
4049
evt.key=evt.KEY_F3;
4050
break;
4051
case 63239:
4052
evt.key=evt.KEY_F4;
4053
break;
4054
case 63240:
4055
evt.key=evt.KEY_F5;
4056
break;
4057
case 63241:
4058
evt.key=evt.KEY_F6;
4059
break;
4060
case 63242:
4061
evt.key=evt.KEY_F7;
4062
break;
4063
case 63243:
4064
evt.key=evt.KEY_F8;
4065
break;
4066
case 63244:
4067
evt.key=evt.KEY_F9;
4068
break;
4069
case 63245:
4070
evt.key=evt.KEY_F10;
4071
break;
4072
case 63246:
4073
evt.key=evt.KEY_F11;
4074
break;
4075
case 63247:
4076
evt.key=evt.KEY_F12;
4077
break;
4078
case 63250:
4079
evt.key=evt.KEY_PAUSE;
4080
break;
4081
case 63272:
4082
evt.key=evt.KEY_DELETE;
4083
break;
4084
case 63273:
4085
evt.key=evt.KEY_HOME;
4086
break;
4087
case 63275:
4088
evt.key=evt.KEY_END;
4089
break;
4090
case 63276:
4091
evt.key=evt.KEY_PAGE_UP;
4092
break;
4093
case 63277:
4094
evt.key=evt.KEY_PAGE_DOWN;
4095
break;
4096
case 63302:
4097
evt.key=evt.KEY_INSERT;
4098
break;
4099
case 63248:
4100
case 63249:
4101
case 63289:
4102
break;
4103
default:
4104
evt.key=evt.charCode>=evt.KEY_SPACE?String.fromCharCode(evt.charCode):evt.keyCode;
4105
}
4106
}else{
4107
evt.key=evt.charCode>0?String.fromCharCode(evt.charCode):evt.keyCode;
4108
}
4109
}
4110
}
4111
}
4112
}
4113
}
4114
if(dojo.render.html.ie){
4115
if(!evt.target){
4116
evt.target=evt.srcElement;
4117
}
4118
if(!evt.currentTarget){
1422 alexandre_ 4119
evt.currentTarget=(_39f?_39f:evt.srcElement);
1318 alexandre_ 4120
}
4121
if(!evt.layerX){
4122
evt.layerX=evt.offsetX;
4123
}
4124
if(!evt.layerY){
4125
evt.layerY=evt.offsetY;
4126
}
4127
var doc=(evt.srcElement&&evt.srcElement.ownerDocument)?evt.srcElement.ownerDocument:document;
1422 alexandre_ 4128
var _3a3=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;
1318 alexandre_ 4129
if(!evt.pageX){
1422 alexandre_ 4130
evt.pageX=evt.clientX+(_3a3.scrollLeft||0);
1318 alexandre_ 4131
}
4132
if(!evt.pageY){
1422 alexandre_ 4133
evt.pageY=evt.clientY+(_3a3.scrollTop||0);
1318 alexandre_ 4134
}
4135
if(evt.type=="mouseover"){
4136
evt.relatedTarget=evt.fromElement;
4137
}
4138
if(evt.type=="mouseout"){
4139
evt.relatedTarget=evt.toElement;
4140
}
4141
this.currentEvent=evt;
4142
evt.callListener=this.callListener;
4143
evt.stopPropagation=this._stopPropagation;
4144
evt.preventDefault=this._preventDefault;
4145
}
4146
return evt;
4147
};
4148
this.stopEvent=function(evt){
4149
if(window.event){
4150
evt.cancelBubble=true;
4151
evt.returnValue=false;
4152
}else{
4153
evt.preventDefault();
4154
evt.stopPropagation();
4155
}
4156
};
4157
};
4158
dojo.kwCompoundRequire({common:["dojo.event.common","dojo.event.topic"],browser:["dojo.event.browser"],dashboard:["dojo.event.browser"]});
4159
dojo.provide("dojo.event.*");
4160
dojo.provide("dojo.gfx.color");
4161
dojo.gfx.color.Color=function(r,g,b,a){
4162
if(dojo.lang.isArray(r)){
4163
this.r=r[0];
4164
this.g=r[1];
4165
this.b=r[2];
4166
this.a=r[3]||1;
4167
}else{
4168
if(dojo.lang.isString(r)){
4169
var rgb=dojo.gfx.color.extractRGB(r);
4170
this.r=rgb[0];
4171
this.g=rgb[1];
4172
this.b=rgb[2];
4173
this.a=g||1;
4174
}else{
4175
if(r instanceof dojo.gfx.color.Color){
4176
this.r=r.r;
4177
this.b=r.b;
4178
this.g=r.g;
4179
this.a=r.a;
4180
}else{
4181
this.r=r;
4182
this.g=g;
4183
this.b=b;
4184
this.a=a;
4185
}
4186
}
4187
}
4188
};
4189
dojo.gfx.color.Color.fromArray=function(arr){
4190
return new dojo.gfx.color.Color(arr[0],arr[1],arr[2],arr[3]);
4191
};
1422 alexandre_ 4192
dojo.extend(dojo.gfx.color.Color,{toRgb:function(_3ab){
4193
if(_3ab){
1318 alexandre_ 4194
return this.toRgba();
4195
}else{
4196
return [this.r,this.g,this.b];
4197
}
4198
},toRgba:function(){
4199
return [this.r,this.g,this.b,this.a];
4200
},toHex:function(){
4201
return dojo.gfx.color.rgb2hex(this.toRgb());
4202
},toCss:function(){
4203
return "rgb("+this.toRgb().join()+")";
4204
},toString:function(){
4205
return this.toHex();
1422 alexandre_ 4206
},blend:function(_3ac,_3ad){
1318 alexandre_ 4207
var rgb=null;
1422 alexandre_ 4208
if(dojo.lang.isArray(_3ac)){
4209
rgb=_3ac;
1318 alexandre_ 4210
}else{
1422 alexandre_ 4211
if(_3ac instanceof dojo.gfx.color.Color){
4212
rgb=_3ac.toRgb();
1318 alexandre_ 4213
}else{
1422 alexandre_ 4214
rgb=new dojo.gfx.color.Color(_3ac).toRgb();
1318 alexandre_ 4215
}
4216
}
1422 alexandre_ 4217
return dojo.gfx.color.blend(this.toRgb(),rgb,_3ad);
1318 alexandre_ 4218
}});
4219
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]};
1422 alexandre_ 4220
dojo.gfx.color.blend=function(a,b,_3b1){
1318 alexandre_ 4221
if(typeof a=="string"){
1422 alexandre_ 4222
return dojo.gfx.color.blendHex(a,b,_3b1);
1318 alexandre_ 4223
}
1422 alexandre_ 4224
if(!_3b1){
4225
_3b1=0;
1318 alexandre_ 4226
}
1422 alexandre_ 4227
_3b1=Math.min(Math.max(-1,_3b1),1);
4228
_3b1=((_3b1+1)/2);
1318 alexandre_ 4229
var c=[];
4230
for(var x=0;x<3;x++){
1422 alexandre_ 4231
c[x]=parseInt(b[x]+((a[x]-b[x])*_3b1));
1318 alexandre_ 4232
}
4233
return c;
4234
};
1422 alexandre_ 4235
dojo.gfx.color.blendHex=function(a,b,_3b6){
4236
return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a),dojo.gfx.color.hex2rgb(b),_3b6));
1318 alexandre_ 4237
};
1422 alexandre_ 4238
dojo.gfx.color.extractRGB=function(_3b7){
1318 alexandre_ 4239
var hex="0123456789abcdef";
1422 alexandre_ 4240
_3b7=_3b7.toLowerCase();
4241
if(_3b7.indexOf("rgb")==0){
4242
var _3b9=_3b7.match(/rgba*\((\d+), *(\d+), *(\d+)/i);
4243
var ret=_3b9.splice(1,3);
1318 alexandre_ 4244
return ret;
4245
}else{
1422 alexandre_ 4246
var _3bb=dojo.gfx.color.hex2rgb(_3b7);
4247
if(_3bb){
4248
return _3bb;
1318 alexandre_ 4249
}else{
1422 alexandre_ 4250
return dojo.gfx.color.named[_3b7]||[255,255,255];
1318 alexandre_ 4251
}
4252
}
4253
};
4254
dojo.gfx.color.hex2rgb=function(hex){
1422 alexandre_ 4255
var _3bd="0123456789ABCDEF";
1318 alexandre_ 4256
var rgb=new Array(3);
4257
if(hex.indexOf("#")==0){
4258
hex=hex.substring(1);
4259
}
4260
hex=hex.toUpperCase();
1422 alexandre_ 4261
if(hex.replace(new RegExp("["+_3bd+"]","g"),"")!=""){
1318 alexandre_ 4262
return null;
4263
}
4264
if(hex.length==3){
4265
rgb[0]=hex.charAt(0)+hex.charAt(0);
4266
rgb[1]=hex.charAt(1)+hex.charAt(1);
4267
rgb[2]=hex.charAt(2)+hex.charAt(2);
4268
}else{
4269
rgb[0]=hex.substring(0,2);
4270
rgb[1]=hex.substring(2,4);
4271
rgb[2]=hex.substring(4);
4272
}
4273
for(var i=0;i<rgb.length;i++){
1422 alexandre_ 4274
rgb[i]=_3bd.indexOf(rgb[i].charAt(0))*16+_3bd.indexOf(rgb[i].charAt(1));
1318 alexandre_ 4275
}
4276
return rgb;
4277
};
4278
dojo.gfx.color.rgb2hex=function(r,g,b){
4279
if(dojo.lang.isArray(r)){
4280
g=r[1]||0;
4281
b=r[2]||0;
4282
r=r[0]||0;
4283
}
4284
var ret=dojo.lang.map([r,g,b],function(x){
4285
x=new Number(x);
4286
var s=x.toString(16);
4287
while(s.length<2){
4288
s="0"+s;
4289
}
4290
return s;
4291
});
4292
ret.unshift("#");
4293
return ret.join("");
4294
};
4295
dojo.provide("dojo.lfx.Animation");
1422 alexandre_ 4296
dojo.lfx.Line=function(_3c6,end){
4297
this.start=_3c6;
1318 alexandre_ 4298
this.end=end;
1422 alexandre_ 4299
if(dojo.lang.isArray(_3c6)){
1318 alexandre_ 4300
var diff=[];
4301
dojo.lang.forEach(this.start,function(s,i){
4302
diff[i]=this.end[i]-s;
4303
},this);
4304
this.getValue=function(n){
4305
var res=[];
4306
dojo.lang.forEach(this.start,function(s,i){
4307
res[i]=(diff[i]*n)+s;
4308
},this);
4309
return res;
4310
};
4311
}else{
1422 alexandre_ 4312
var diff=end-_3c6;
1318 alexandre_ 4313
this.getValue=function(n){
4314
return (diff*n)+this.start;
4315
};
4316
}
4317
};
4318
if((dojo.render.html.khtml)&&(!dojo.render.html.safari)){
4319
dojo.lfx.easeDefault=function(n){
4320
return (parseFloat("0.5")+((Math.sin((n+parseFloat("1.5"))*Math.PI))/2));
4321
};
4322
}else{
4323
dojo.lfx.easeDefault=function(n){
4324
return (0.5+((Math.sin((n+1.5)*Math.PI))/2));
4325
};
4326
}
4327
dojo.lfx.easeIn=function(n){
4328
return Math.pow(n,3);
4329
};
4330
dojo.lfx.easeOut=function(n){
4331
return (1-Math.pow(1-n,3));
4332
};
4333
dojo.lfx.easeInOut=function(n){
4334
return ((3*Math.pow(n,2))-(2*Math.pow(n,3)));
4335
};
4336
dojo.lfx.IAnimation=function(){
4337
};
1422 alexandre_ 4338
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,_3d6,_3d7){
4339
if(!_3d7){
4340
_3d7=_3d6;
4341
_3d6=this;
1318 alexandre_ 4342
}
1422 alexandre_ 4343
_3d7=dojo.lang.hitch(_3d6,_3d7);
4344
var _3d8=this[evt]||function(){
1318 alexandre_ 4345
};
4346
this[evt]=function(){
1422 alexandre_ 4347
var ret=_3d8.apply(this,arguments);
4348
_3d7.apply(this,arguments);
1318 alexandre_ 4349
return ret;
4350
};
4351
return this;
4352
},fire:function(evt,args){
4353
if(this[evt]){
4354
this[evt].apply(this,(args||[]));
4355
}
4356
return this;
1422 alexandre_ 4357
},repeat:function(_3dc){
4358
this.repeatCount=_3dc;
1318 alexandre_ 4359
return this;
4360
},_active:false,_paused:false});
1422 alexandre_ 4361
dojo.lfx.Animation=function(_3dd,_3de,_3df,_3e0,_3e1,rate){
1318 alexandre_ 4362
dojo.lfx.IAnimation.call(this);
1422 alexandre_ 4363
if(dojo.lang.isNumber(_3dd)||(!_3dd&&_3de.getValue)){
4364
rate=_3e1;
4365
_3e1=_3e0;
4366
_3e0=_3df;
4367
_3df=_3de;
4368
_3de=_3dd;
4369
_3dd=null;
1318 alexandre_ 4370
}else{
1422 alexandre_ 4371
if(_3dd.getValue||dojo.lang.isArray(_3dd)){
4372
rate=_3e0;
4373
_3e1=_3df;
4374
_3e0=_3de;
4375
_3df=_3dd;
4376
_3de=null;
4377
_3dd=null;
1318 alexandre_ 4378
}
4379
}
1422 alexandre_ 4380
if(dojo.lang.isArray(_3df)){
4381
this.curve=new dojo.lfx.Line(_3df[0],_3df[1]);
1318 alexandre_ 4382
}else{
1422 alexandre_ 4383
this.curve=_3df;
1318 alexandre_ 4384
}
1422 alexandre_ 4385
if(_3de!=null&&_3de>0){
4386
this.duration=_3de;
1318 alexandre_ 4387
}
1422 alexandre_ 4388
if(_3e1){
4389
this.repeatCount=_3e1;
1318 alexandre_ 4390
}
4391
if(rate){
4392
this.rate=rate;
4393
}
1422 alexandre_ 4394
if(_3dd){
1318 alexandre_ 4395
dojo.lang.forEach(["handler","beforeBegin","onBegin","onEnd","onPlay","onStop","onAnimate"],function(item){
1422 alexandre_ 4396
if(_3dd[item]){
4397
this.connect(item,_3dd[item]);
1318 alexandre_ 4398
}
4399
},this);
4400
}
1422 alexandre_ 4401
if(_3e0&&dojo.lang.isFunction(_3e0)){
4402
this.easing=_3e0;
1318 alexandre_ 4403
}
4404
};
4405
dojo.inherits(dojo.lfx.Animation,dojo.lfx.IAnimation);
1422 alexandre_ 4406
dojo.lang.extend(dojo.lfx.Animation,{_startTime:null,_endTime:null,_timer:null,_percent:0,_startRepeatCount:0,play:function(_3e4,_3e5){
4407
if(_3e5){
1318 alexandre_ 4408
clearTimeout(this._timer);
4409
this._active=false;
4410
this._paused=false;
4411
this._percent=0;
4412
}else{
4413
if(this._active&&!this._paused){
4414
return this;
4415
}
4416
}
4417
this.fire("handler",["beforeBegin"]);
4418
this.fire("beforeBegin");
1422 alexandre_ 4419
if(_3e4>0){
1318 alexandre_ 4420
setTimeout(dojo.lang.hitch(this,function(){
1422 alexandre_ 4421
this.play(null,_3e5);
4422
}),_3e4);
1318 alexandre_ 4423
return this;
4424
}
4425
this._startTime=new Date().valueOf();
4426
if(this._paused){
4427
this._startTime-=(this.duration*this._percent/100);
4428
}
4429
this._endTime=this._startTime+this.duration;
4430
this._active=true;
4431
this._paused=false;
4432
var step=this._percent/100;
1422 alexandre_ 4433
var _3e7=this.curve.getValue(step);
1318 alexandre_ 4434
if(this._percent==0){
4435
if(!this._startRepeatCount){
4436
this._startRepeatCount=this.repeatCount;
4437
}
1422 alexandre_ 4438
this.fire("handler",["begin",_3e7]);
4439
this.fire("onBegin",[_3e7]);
1318 alexandre_ 4440
}
1422 alexandre_ 4441
this.fire("handler",["play",_3e7]);
4442
this.fire("onPlay",[_3e7]);
1318 alexandre_ 4443
this._cycle();
4444
return this;
4445
},pause:function(){
4446
clearTimeout(this._timer);
4447
if(!this._active){
4448
return this;
4449
}
4450
this._paused=true;
1422 alexandre_ 4451
var _3e8=this.curve.getValue(this._percent/100);
4452
this.fire("handler",["pause",_3e8]);
4453
this.fire("onPause",[_3e8]);
1318 alexandre_ 4454
return this;
1422 alexandre_ 4455
},gotoPercent:function(pct,_3ea){
1318 alexandre_ 4456
clearTimeout(this._timer);
4457
this._active=true;
4458
this._paused=true;
4459
this._percent=pct;
1422 alexandre_ 4460
if(_3ea){
1318 alexandre_ 4461
this.play();
4462
}
4463
return this;
1422 alexandre_ 4464
},stop:function(_3eb){
1318 alexandre_ 4465
clearTimeout(this._timer);
4466
var step=this._percent/100;
1422 alexandre_ 4467
if(_3eb){
1318 alexandre_ 4468
step=1;
4469
}
1422 alexandre_ 4470
var _3ed=this.curve.getValue(step);
4471
this.fire("handler",["stop",_3ed]);
4472
this.fire("onStop",[_3ed]);
1318 alexandre_ 4473
this._active=false;
4474
this._paused=false;
4475
return this;
4476
},status:function(){
4477
if(this._active){
4478
return this._paused?"paused":"playing";
4479
}else{
4480
return "stopped";
4481
}
4482
return this;
4483
},_cycle:function(){
4484
clearTimeout(this._timer);
4485
if(this._active){
4486
var curr=new Date().valueOf();
4487
var step=(curr-this._startTime)/(this._endTime-this._startTime);
4488
if(step>=1){
4489
step=1;
4490
this._percent=100;
4491
}else{
4492
this._percent=step*100;
4493
}
4494
if((this.easing)&&(dojo.lang.isFunction(this.easing))){
4495
step=this.easing(step);
4496
}
1422 alexandre_ 4497
var _3f0=this.curve.getValue(step);
4498
this.fire("handler",["animate",_3f0]);
4499
this.fire("onAnimate",[_3f0]);
1318 alexandre_ 4500
if(step<1){
4501
this._timer=setTimeout(dojo.lang.hitch(this,"_cycle"),this.rate);
4502
}else{
4503
this._active=false;
4504
this.fire("handler",["end"]);
4505
this.fire("onEnd");
4506
if(this.repeatCount>0){
4507
this.repeatCount--;
4508
this.play(null,true);
4509
}else{
4510
if(this.repeatCount==-1){
4511
this.play(null,true);
4512
}else{
4513
if(this._startRepeatCount){
4514
this.repeatCount=this._startRepeatCount;
4515
this._startRepeatCount=0;
4516
}
4517
}
4518
}
4519
}
4520
}
4521
return this;
4522
}});
1422 alexandre_ 4523
dojo.lfx.Combine=function(_3f1){
1318 alexandre_ 4524
dojo.lfx.IAnimation.call(this);
4525
this._anims=[];
4526
this._animsEnded=0;
1422 alexandre_ 4527
var _3f2=arguments;
4528
if(_3f2.length==1&&(dojo.lang.isArray(_3f2[0])||dojo.lang.isArrayLike(_3f2[0]))){
4529
_3f2=_3f2[0];
1318 alexandre_ 4530
}
1422 alexandre_ 4531
dojo.lang.forEach(_3f2,function(anim){
1318 alexandre_ 4532
this._anims.push(anim);
4533
anim.connect("onEnd",dojo.lang.hitch(this,"_onAnimsEnded"));
4534
},this);
4535
};
4536
dojo.inherits(dojo.lfx.Combine,dojo.lfx.IAnimation);
1422 alexandre_ 4537
dojo.lang.extend(dojo.lfx.Combine,{_animsEnded:0,play:function(_3f4,_3f5){
1318 alexandre_ 4538
if(!this._anims.length){
4539
return this;
4540
}
4541
this.fire("beforeBegin");
1422 alexandre_ 4542
if(_3f4>0){
1318 alexandre_ 4543
setTimeout(dojo.lang.hitch(this,function(){
1422 alexandre_ 4544
this.play(null,_3f5);
4545
}),_3f4);
1318 alexandre_ 4546
return this;
4547
}
1422 alexandre_ 4548
if(_3f5||this._anims[0].percent==0){
1318 alexandre_ 4549
this.fire("onBegin");
4550
}
4551
this.fire("onPlay");
1422 alexandre_ 4552
this._animsCall("play",null,_3f5);
1318 alexandre_ 4553
return this;
4554
},pause:function(){
4555
this.fire("onPause");
4556
this._animsCall("pause");
4557
return this;
1422 alexandre_ 4558
},stop:function(_3f6){
1318 alexandre_ 4559
this.fire("onStop");
1422 alexandre_ 4560
this._animsCall("stop",_3f6);
1318 alexandre_ 4561
return this;
4562
},_onAnimsEnded:function(){
4563
this._animsEnded++;
4564
if(this._animsEnded>=this._anims.length){
4565
this.fire("onEnd");
4566
}
4567
return this;
1422 alexandre_ 4568
},_animsCall:function(_3f7){
1318 alexandre_ 4569
var args=[];
4570
if(arguments.length>1){
4571
for(var i=1;i<arguments.length;i++){
4572
args.push(arguments[i]);
4573
}
4574
}
1422 alexandre_ 4575
var _3fa=this;
1318 alexandre_ 4576
dojo.lang.forEach(this._anims,function(anim){
1422 alexandre_ 4577
anim[_3f7](args);
4578
},_3fa);
1318 alexandre_ 4579
return this;
4580
}});
1422 alexandre_ 4581
dojo.lfx.Chain=function(_3fc){
1318 alexandre_ 4582
dojo.lfx.IAnimation.call(this);
4583
this._anims=[];
4584
this._currAnim=-1;
1422 alexandre_ 4585
var _3fd=arguments;
4586
if(_3fd.length==1&&(dojo.lang.isArray(_3fd[0])||dojo.lang.isArrayLike(_3fd[0]))){
4587
_3fd=_3fd[0];
1318 alexandre_ 4588
}
1422 alexandre_ 4589
var _3fe=this;
4590
dojo.lang.forEach(_3fd,function(anim,i,_401){
1318 alexandre_ 4591
this._anims.push(anim);
1422 alexandre_ 4592
if(i<_401.length-1){
1318 alexandre_ 4593
anim.connect("onEnd",dojo.lang.hitch(this,"_playNext"));
4594
}else{
4595
anim.connect("onEnd",dojo.lang.hitch(this,function(){
4596
this.fire("onEnd");
4597
}));
4598
}
4599
},this);
4600
};
4601
dojo.inherits(dojo.lfx.Chain,dojo.lfx.IAnimation);
1422 alexandre_ 4602
dojo.lang.extend(dojo.lfx.Chain,{_currAnim:-1,play:function(_402,_403){
1318 alexandre_ 4603
if(!this._anims.length){
4604
return this;
4605
}
1422 alexandre_ 4606
if(_403||!this._anims[this._currAnim]){
1318 alexandre_ 4607
this._currAnim=0;
4608
}
1422 alexandre_ 4609
var _404=this._anims[this._currAnim];
1318 alexandre_ 4610
this.fire("beforeBegin");
1422 alexandre_ 4611
if(_402>0){
1318 alexandre_ 4612
setTimeout(dojo.lang.hitch(this,function(){
1422 alexandre_ 4613
this.play(null,_403);
4614
}),_402);
1318 alexandre_ 4615
return this;
4616
}
1422 alexandre_ 4617
if(_404){
1318 alexandre_ 4618
if(this._currAnim==0){
4619
this.fire("handler",["begin",this._currAnim]);
4620
this.fire("onBegin",[this._currAnim]);
4621
}
4622
this.fire("onPlay",[this._currAnim]);
1422 alexandre_ 4623
_404.play(null,_403);
1318 alexandre_ 4624
}
4625
return this;
4626
},pause:function(){
4627
if(this._anims[this._currAnim]){
4628
this._anims[this._currAnim].pause();
4629
this.fire("onPause",[this._currAnim]);
4630
}
4631
return this;
4632
},playPause:function(){
4633
if(this._anims.length==0){
4634
return this;
4635
}
4636
if(this._currAnim==-1){
4637
this._currAnim=0;
4638
}
1422 alexandre_ 4639
var _405=this._anims[this._currAnim];
4640
if(_405){
4641
if(!_405._active||_405._paused){
1318 alexandre_ 4642
this.play();
4643
}else{
4644
this.pause();
4645
}
4646
}
4647
return this;
4648
},stop:function(){
1422 alexandre_ 4649
var _406=this._anims[this._currAnim];
4650
if(_406){
4651
_406.stop();
1318 alexandre_ 4652
this.fire("onStop",[this._currAnim]);
4653
}
1422 alexandre_ 4654
return _406;
1318 alexandre_ 4655
},_playNext:function(){
4656
if(this._currAnim==-1||this._anims.length==0){
4657
return this;
4658
}
4659
this._currAnim++;
4660
if(this._anims[this._currAnim]){
4661
this._anims[this._currAnim].play(null,true);
4662
}
4663
return this;
4664
}});
1422 alexandre_ 4665
dojo.lfx.combine=function(_407){
4666
var _408=arguments;
1318 alexandre_ 4667
if(dojo.lang.isArray(arguments[0])){
1422 alexandre_ 4668
_408=arguments[0];
1318 alexandre_ 4669
}
1422 alexandre_ 4670
if(_408.length==1){
4671
return _408[0];
1318 alexandre_ 4672
}
1422 alexandre_ 4673
return new dojo.lfx.Combine(_408);
1318 alexandre_ 4674
};
1422 alexandre_ 4675
dojo.lfx.chain=function(_409){
4676
var _40a=arguments;
1318 alexandre_ 4677
if(dojo.lang.isArray(arguments[0])){
1422 alexandre_ 4678
_40a=arguments[0];
1318 alexandre_ 4679
}
1422 alexandre_ 4680
if(_40a.length==1){
4681
return _40a[0];
1318 alexandre_ 4682
}
1422 alexandre_ 4683
return new dojo.lfx.Chain(_40a);
1318 alexandre_ 4684
};
4685
dojo.provide("dojo.html.common");
4686
dojo.lang.mixin(dojo.html,dojo.dom);
4687
dojo.html.body=function(){
4688
dojo.deprecated("dojo.html.body() moved to dojo.body()","0.5");
4689
return dojo.body();
4690
};
4691
dojo.html.getEventTarget=function(evt){
4692
if(!evt){
4693
evt=dojo.global().event||{};
4694
}
4695
var t=(evt.srcElement?evt.srcElement:(evt.target?evt.target:null));
4696
while((t)&&(t.nodeType!=1)){
4697
t=t.parentNode;
4698
}
4699
return t;
4700
};
4701
dojo.html.getViewport=function(){
1422 alexandre_ 4702
var _40d=dojo.global();
4703
var _40e=dojo.doc();
1318 alexandre_ 4704
var w=0;
4705
var h=0;
4706
if(dojo.render.html.mozilla){
1422 alexandre_ 4707
w=_40e.documentElement.clientWidth;
4708
h=_40d.innerHeight;
1318 alexandre_ 4709
}else{
1422 alexandre_ 4710
if(!dojo.render.html.opera&&_40d.innerWidth){
4711
w=_40d.innerWidth;
4712
h=_40d.innerHeight;
1318 alexandre_ 4713
}else{
1422 alexandre_ 4714
if(!dojo.render.html.opera&&dojo.exists(_40e,"documentElement.clientWidth")){
4715
var w2=_40e.documentElement.clientWidth;
1318 alexandre_ 4716
if(!w||w2&&w2<w){
4717
w=w2;
4718
}
1422 alexandre_ 4719
h=_40e.documentElement.clientHeight;
1318 alexandre_ 4720
}else{
4721
if(dojo.body().clientWidth){
4722
w=dojo.body().clientWidth;
4723
h=dojo.body().clientHeight;
4724
}
4725
}
4726
}
4727
}
4728
return {width:w,height:h};
4729
};
4730
dojo.html.getScroll=function(){
1422 alexandre_ 4731
var _412=dojo.global();
4732
var _413=dojo.doc();
4733
var top=_412.pageYOffset||_413.documentElement.scrollTop||dojo.body().scrollTop||0;
4734
var left=_412.pageXOffset||_413.documentElement.scrollLeft||dojo.body().scrollLeft||0;
1318 alexandre_ 4735
return {top:top,left:left,offset:{x:left,y:top}};
4736
};
4737
dojo.html.getParentByType=function(node,type){
1422 alexandre_ 4738
var _418=dojo.doc();
4739
var _419=dojo.byId(node);
1318 alexandre_ 4740
type=type.toLowerCase();
1422 alexandre_ 4741
while((_419)&&(_419.nodeName.toLowerCase()!=type)){
4742
if(_419==(_418["body"]||_418["documentElement"])){
1318 alexandre_ 4743
return null;
4744
}
1422 alexandre_ 4745
_419=_419.parentNode;
1318 alexandre_ 4746
}
1422 alexandre_ 4747
return _419;
1318 alexandre_ 4748
};
4749
dojo.html.getAttribute=function(node,attr){
4750
node=dojo.byId(node);
4751
if((!node)||(!node.getAttribute)){
4752
return null;
4753
}
4754
var ta=typeof attr=="string"?attr:new String(attr);
4755
var v=node.getAttribute(ta.toUpperCase());
4756
if((v)&&(typeof v=="string")&&(v!="")){
4757
return v;
4758
}
4759
if(v&&v.value){
4760
return v.value;
4761
}
4762
if((node.getAttributeNode)&&(node.getAttributeNode(ta))){
4763
return (node.getAttributeNode(ta)).value;
4764
}else{
4765
if(node.getAttribute(ta)){
4766
return node.getAttribute(ta);
4767
}else{
4768
if(node.getAttribute(ta.toLowerCase())){
4769
return node.getAttribute(ta.toLowerCase());
4770
}
4771
}
4772
}
4773
return null;
4774
};
4775
dojo.html.hasAttribute=function(node,attr){
4776
return dojo.html.getAttribute(dojo.byId(node),attr)?true:false;
4777
};
4778
dojo.html.getCursorPosition=function(e){
4779
e=e||dojo.global().event;
1422 alexandre_ 4780
var _421={x:0,y:0};
1318 alexandre_ 4781
if(e.pageX||e.pageY){
1422 alexandre_ 4782
_421.x=e.pageX;
4783
_421.y=e.pageY;
1318 alexandre_ 4784
}else{
4785
var de=dojo.doc().documentElement;
4786
var db=dojo.body();
1422 alexandre_ 4787
_421.x=e.clientX+((de||db)["scrollLeft"])-((de||db)["clientLeft"]);
4788
_421.y=e.clientY+((de||db)["scrollTop"])-((de||db)["clientTop"]);
1318 alexandre_ 4789
}
1422 alexandre_ 4790
return _421;
1318 alexandre_ 4791
};
4792
dojo.html.isTag=function(node){
4793
node=dojo.byId(node);
4794
if(node&&node.tagName){
4795
for(var i=1;i<arguments.length;i++){
4796
if(node.tagName.toLowerCase()==String(arguments[i]).toLowerCase()){
4797
return String(arguments[i]).toLowerCase();
4798
}
4799
}
4800
}
4801
return "";
4802
};
4803
if(dojo.render.html.ie&&!dojo.render.html.ie70){
4804
if(window.location.href.substr(0,6).toLowerCase()!="https:"){
4805
(function(){
1422 alexandre_ 4806
var _426=dojo.doc().createElement("script");
4807
_426.src="javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'";
4808
dojo.doc().getElementsByTagName("head")[0].appendChild(_426);
1318 alexandre_ 4809
})();
4810
}
4811
}else{
4812
dojo.html.createExternalElement=function(doc,tag){
4813
return doc.createElement(tag);
4814
};
4815
}
1422 alexandre_ 4816
dojo.html._callDeprecated=function(_429,_42a,args,_42c,_42d){
4817
dojo.deprecated("dojo.html."+_429,"replaced by dojo.html."+_42a+"("+(_42c?"node, {"+_42c+": "+_42c+"}":"")+")"+(_42d?"."+_42d:""),"0.5");
4818
var _42e=[];
4819
if(_42c){
4820
var _42f={};
4821
_42f[_42c]=args[1];
4822
_42e.push(args[0]);
4823
_42e.push(_42f);
1318 alexandre_ 4824
}else{
1422 alexandre_ 4825
_42e=args;
1318 alexandre_ 4826
}
1422 alexandre_ 4827
var ret=dojo.html[_42a].apply(dojo.html,args);
4828
if(_42d){
4829
return ret[_42d];
1318 alexandre_ 4830
}else{
4831
return ret;
4832
}
4833
};
4834
dojo.html.getViewportWidth=function(){
4835
return dojo.html._callDeprecated("getViewportWidth","getViewport",arguments,null,"width");
4836
};
4837
dojo.html.getViewportHeight=function(){
4838
return dojo.html._callDeprecated("getViewportHeight","getViewport",arguments,null,"height");
4839
};
4840
dojo.html.getViewportSize=function(){
4841
return dojo.html._callDeprecated("getViewportSize","getViewport",arguments);
4842
};
4843
dojo.html.getScrollTop=function(){
4844
return dojo.html._callDeprecated("getScrollTop","getScroll",arguments,null,"top");
4845
};
4846
dojo.html.getScrollLeft=function(){
4847
return dojo.html._callDeprecated("getScrollLeft","getScroll",arguments,null,"left");
4848
};
4849
dojo.html.getScrollOffset=function(){
4850
return dojo.html._callDeprecated("getScrollOffset","getScroll",arguments,null,"offset");
4851
};
4852
dojo.provide("dojo.uri.Uri");
4853
dojo.uri=new function(){
4854
this.dojoUri=function(uri){
4855
return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(),uri);
4856
};
1422 alexandre_ 4857
this.moduleUri=function(_432,uri){
4858
var loc=dojo.hostenv.getModuleSymbols(_432).join("/");
1318 alexandre_ 4859
if(!loc){
4860
return null;
4861
}
4862
if(loc.lastIndexOf("/")!=loc.length-1){
4863
loc+="/";
4864
}
1422 alexandre_ 4865
var _435=loc.indexOf(":");
4866
var _436=loc.indexOf("/");
4867
if(loc.charAt(0)!="/"&&(_435==-1||_435>_436)){
1318 alexandre_ 4868
loc=dojo.hostenv.getBaseScriptUri()+loc;
4869
}
4870
return new dojo.uri.Uri(loc,uri);
4871
};
4872
this.Uri=function(){
4873
var uri=arguments[0];
4874
for(var i=1;i<arguments.length;i++){
4875
if(!arguments[i]){
4876
continue;
4877
}
1422 alexandre_ 4878
var _439=new dojo.uri.Uri(arguments[i].toString());
4879
var _43a=new dojo.uri.Uri(uri.toString());
4880
if((_439.path=="")&&(_439.scheme==null)&&(_439.authority==null)&&(_439.query==null)){
4881
if(_439.fragment!=null){
4882
_43a.fragment=_439.fragment;
1318 alexandre_ 4883
}
1422 alexandre_ 4884
_439=_43a;
1318 alexandre_ 4885
}else{
1422 alexandre_ 4886
if(_439.scheme==null){
4887
_439.scheme=_43a.scheme;
4888
if(_439.authority==null){
4889
_439.authority=_43a.authority;
4890
if(_439.path.charAt(0)!="/"){
4891
var path=_43a.path.substring(0,_43a.path.lastIndexOf("/")+1)+_439.path;
1318 alexandre_ 4892
var segs=path.split("/");
4893
for(var j=0;j<segs.length;j++){
4894
if(segs[j]=="."){
4895
if(j==segs.length-1){
4896
segs[j]="";
4897
}else{
4898
segs.splice(j,1);
4899
j--;
4900
}
4901
}else{
4902
if(j>0&&!(j==1&&segs[0]=="")&&segs[j]==".."&&segs[j-1]!=".."){
4903
if(j==segs.length-1){
4904
segs.splice(j,1);
4905
segs[j-1]="";
4906
}else{
4907
segs.splice(j-1,2);
4908
j-=2;
4909
}
4910
}
4911
}
4912
}
1422 alexandre_ 4913
_439.path=segs.join("/");
1318 alexandre_ 4914
}
4915
}
4916
}
4917
}
4918
uri="";
1422 alexandre_ 4919
if(_439.scheme!=null){
4920
uri+=_439.scheme+":";
1318 alexandre_ 4921
}
1422 alexandre_ 4922
if(_439.authority!=null){
4923
uri+="//"+_439.authority;
1318 alexandre_ 4924
}
1422 alexandre_ 4925
uri+=_439.path;
4926
if(_439.query!=null){
4927
uri+="?"+_439.query;
1318 alexandre_ 4928
}
1422 alexandre_ 4929
if(_439.fragment!=null){
4930
uri+="#"+_439.fragment;
1318 alexandre_ 4931
}
4932
}
4933
this.uri=uri.toString();
1422 alexandre_ 4934
var _43e="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
4935
var r=this.uri.match(new RegExp(_43e));
1318 alexandre_ 4936
this.scheme=r[2]||(r[1]?"":null);
4937
this.authority=r[4]||(r[3]?"":null);
4938
this.path=r[5];
4939
this.query=r[7]||(r[6]?"":null);
4940
this.fragment=r[9]||(r[8]?"":null);
4941
if(this.authority!=null){
1422 alexandre_ 4942
_43e="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";
4943
r=this.authority.match(new RegExp(_43e));
1318 alexandre_ 4944
this.user=r[3]||null;
4945
this.password=r[4]||null;
4946
this.host=r[5];
4947
this.port=r[7]||null;
4948
}
4949
this.toString=function(){
4950
return this.uri;
4951
};
4952
};
4953
};
4954
dojo.provide("dojo.html.style");
4955
dojo.html.getClass=function(node){
4956
node=dojo.byId(node);
4957
if(!node){
4958
return "";
4959
}
4960
var cs="";
4961
if(node.className){
4962
cs=node.className;
4963
}else{
4964
if(dojo.html.hasAttribute(node,"class")){
4965
cs=dojo.html.getAttribute(node,"class");
4966
}
4967
}
4968
return cs.replace(/^\s+|\s+$/g,"");
4969
};
4970
dojo.html.getClasses=function(node){
4971
var c=dojo.html.getClass(node);
4972
return (c=="")?[]:c.split(/\s+/g);
4973
};
1422 alexandre_ 4974
dojo.html.hasClass=function(node,_445){
4975
return (new RegExp("(^|\\s+)"+_445+"(\\s+|$)")).test(dojo.html.getClass(node));
1318 alexandre_ 4976
};
1422 alexandre_ 4977
dojo.html.prependClass=function(node,_447){
4978
_447+=" "+dojo.html.getClass(node);
4979
return dojo.html.setClass(node,_447);
1318 alexandre_ 4980
};
1422 alexandre_ 4981
dojo.html.addClass=function(node,_449){
4982
if(dojo.html.hasClass(node,_449)){
1318 alexandre_ 4983
return false;
4984
}
1422 alexandre_ 4985
_449=(dojo.html.getClass(node)+" "+_449).replace(/^\s+|\s+$/g,"");
4986
return dojo.html.setClass(node,_449);
1318 alexandre_ 4987
};
1422 alexandre_ 4988
dojo.html.setClass=function(node,_44b){
1318 alexandre_ 4989
node=dojo.byId(node);
1422 alexandre_ 4990
var cs=new String(_44b);
1318 alexandre_ 4991
try{
4992
if(typeof node.className=="string"){
4993
node.className=cs;
4994
}else{
4995
if(node.setAttribute){
1422 alexandre_ 4996
node.setAttribute("class",_44b);
1318 alexandre_ 4997
node.className=cs;
4998
}else{
4999
return false;
5000
}
5001
}
5002
}
5003
catch(e){
5004
dojo.debug("dojo.html.setClass() failed",e);
5005
}
5006
return true;
5007
};
1422 alexandre_ 5008
dojo.html.removeClass=function(node,_44e,_44f){
1318 alexandre_ 5009
try{
1422 alexandre_ 5010
if(!_44f){
5011
var _450=dojo.html.getClass(node).replace(new RegExp("(^|\\s+)"+_44e+"(\\s+|$)"),"$1$2");
1318 alexandre_ 5012
}else{
1422 alexandre_ 5013
var _450=dojo.html.getClass(node).replace(_44e,"");
1318 alexandre_ 5014
}
1422 alexandre_ 5015
dojo.html.setClass(node,_450);
1318 alexandre_ 5016
}
5017
catch(e){
5018
dojo.debug("dojo.html.removeClass() failed",e);
5019
}
5020
return true;
5021
};
1422 alexandre_ 5022
dojo.html.replaceClass=function(node,_452,_453){
5023
dojo.html.removeClass(node,_453);
5024
dojo.html.addClass(node,_452);
1318 alexandre_ 5025
};
5026
dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2};
1422 alexandre_ 5027
dojo.html.getElementsByClass=function(_454,_455,_456,_457,_458){
5028
_458=false;
5029
var _459=dojo.doc();
5030
_455=dojo.byId(_455)||_459;
5031
var _45a=_454.split(/\s+/g);
5032
var _45b=[];
5033
if(_457!=1&&_457!=2){
5034
_457=0;
1318 alexandre_ 5035
}
1422 alexandre_ 5036
var _45c=new RegExp("(\\s|^)(("+_45a.join(")|(")+"))(\\s|$)");
5037
var _45d=_45a.join(" ").length;
5038
var _45e=[];
5039
if(!_458&&_459.evaluate){
5040
var _45f=".//"+(_456||"*")+"[contains(";
5041
if(_457!=dojo.html.classMatchType.ContainsAny){
5042
_45f+="concat(' ',@class,' '), ' "+_45a.join(" ') and contains(concat(' ',@class,' '), ' ")+" ')";
5043
if(_457==2){
5044
_45f+=" and string-length(@class)="+_45d+"]";
1318 alexandre_ 5045
}else{
1422 alexandre_ 5046
_45f+="]";
1318 alexandre_ 5047
}
5048
}else{
1422 alexandre_ 5049
_45f+="concat(' ',@class,' '), ' "+_45a.join(" ') or contains(concat(' ',@class,' '), ' ")+" ')]";
1318 alexandre_ 5050
}
1422 alexandre_ 5051
var _460=_459.evaluate(_45f,_455,null,XPathResult.ANY_TYPE,null);
5052
var _461=_460.iterateNext();
5053
while(_461){
1318 alexandre_ 5054
try{
1422 alexandre_ 5055
_45e.push(_461);
5056
_461=_460.iterateNext();
1318 alexandre_ 5057
}
5058
catch(e){
5059
break;
5060
}
5061
}
1422 alexandre_ 5062
return _45e;
1318 alexandre_ 5063
}else{
1422 alexandre_ 5064
if(!_456){
5065
_456="*";
1318 alexandre_ 5066
}
1422 alexandre_ 5067
_45e=_455.getElementsByTagName(_456);
1318 alexandre_ 5068
var node,i=0;
5069
outer:
1422 alexandre_ 5070
while(node=_45e[i++]){
5071
var _464=dojo.html.getClasses(node);
5072
if(_464.length==0){
1318 alexandre_ 5073
continue outer;
5074
}
1422 alexandre_ 5075
var _465=0;
5076
for(var j=0;j<_464.length;j++){
5077
if(_45c.test(_464[j])){
5078
if(_457==dojo.html.classMatchType.ContainsAny){
5079
_45b.push(node);
1318 alexandre_ 5080
continue outer;
5081
}else{
1422 alexandre_ 5082
_465++;
1318 alexandre_ 5083
}
5084
}else{
1422 alexandre_ 5085
if(_457==dojo.html.classMatchType.IsOnly){
1318 alexandre_ 5086
continue outer;
5087
}
5088
}
5089
}
1422 alexandre_ 5090
if(_465==_45a.length){
5091
if((_457==dojo.html.classMatchType.IsOnly)&&(_465==_464.length)){
5092
_45b.push(node);
1318 alexandre_ 5093
}else{
1422 alexandre_ 5094
if(_457==dojo.html.classMatchType.ContainsAll){
5095
_45b.push(node);
1318 alexandre_ 5096
}
5097
}
5098
}
5099
}
1422 alexandre_ 5100
return _45b;
1318 alexandre_ 5101
}
5102
};
5103
dojo.html.getElementsByClassName=dojo.html.getElementsByClass;
1422 alexandre_ 5104
dojo.html.toCamelCase=function(_467){
5105
var arr=_467.split("-"),cc=arr[0];
1318 alexandre_ 5106
for(var i=1;i<arr.length;i++){
5107
cc+=arr[i].charAt(0).toUpperCase()+arr[i].substring(1);
5108
}
5109
return cc;
5110
};
1422 alexandre_ 5111
dojo.html.toSelectorCase=function(_46b){
5112
return _46b.replace(/([A-Z])/g,"-$1").toLowerCase();
1318 alexandre_ 5113
};
5114
if(dojo.render.html.ie){
1422 alexandre_ 5115
dojo.html.getComputedStyle=function(node,_46d,_46e){
1318 alexandre_ 5116
node=dojo.byId(node);
1422 alexandre_ 5117
if(!node||!node.currentStyle){
5118
return _46e;
1318 alexandre_ 5119
}
1422 alexandre_ 5120
return node.currentStyle[dojo.html.toCamelCase(_46d)];
1318 alexandre_ 5121
};
5122
dojo.html.getComputedStyles=function(node){
5123
return node.currentStyle;
5124
};
5125
}else{
1422 alexandre_ 5126
dojo.html.getComputedStyle=function(node,_471,_472){
1318 alexandre_ 5127
node=dojo.byId(node);
5128
if(!node||!node.style){
1422 alexandre_ 5129
return _472;
1318 alexandre_ 5130
}
5131
var s=document.defaultView.getComputedStyle(node,null);
1422 alexandre_ 5132
return (s&&s[dojo.html.toCamelCase(_471)])||"";
1318 alexandre_ 5133
};
5134
dojo.html.getComputedStyles=function(node){
5135
return document.defaultView.getComputedStyle(node,null);
5136
};
5137
}
1422 alexandre_ 5138
dojo.html.getStyleProperty=function(node,_476){
1318 alexandre_ 5139
node=dojo.byId(node);
1422 alexandre_ 5140
return (node&&node.style?node.style[dojo.html.toCamelCase(_476)]:undefined);
1318 alexandre_ 5141
};
1422 alexandre_ 5142
dojo.html.getStyle=function(node,_478){
5143
var _479=dojo.html.getStyleProperty(node,_478);
5144
return (_479?_479:dojo.html.getComputedStyle(node,_478));
1318 alexandre_ 5145
};
1422 alexandre_ 5146
dojo.html.setStyle=function(node,_47b,_47c){
1318 alexandre_ 5147
node=dojo.byId(node);
5148
if(node&&node.style){
1422 alexandre_ 5149
var _47d=dojo.html.toCamelCase(_47b);
5150
node.style[_47d]=_47c;
1318 alexandre_ 5151
}
5152
};
1422 alexandre_ 5153
dojo.html.setStyleText=function(_47e,text){
1318 alexandre_ 5154
try{
1422 alexandre_ 5155
_47e.style.cssText=text;
1318 alexandre_ 5156
}
5157
catch(e){
1422 alexandre_ 5158
_47e.setAttribute("style",text);
1318 alexandre_ 5159
}
5160
};
1422 alexandre_ 5161
dojo.html.copyStyle=function(_480,_481){
5162
if(!_481.style.cssText){
5163
_480.setAttribute("style",_481.getAttribute("style"));
1318 alexandre_ 5164
}else{
1422 alexandre_ 5165
_480.style.cssText=_481.style.cssText;
1318 alexandre_ 5166
}
1422 alexandre_ 5167
dojo.html.addClass(_480,dojo.html.getClass(_481));
1318 alexandre_ 5168
};
1422 alexandre_ 5169
dojo.html.getUnitValue=function(node,_483,_484){
5170
var s=dojo.html.getComputedStyle(node,_483);
5171
if((!s)||((s=="auto")&&(_484))){
1318 alexandre_ 5172
return {value:0,units:"px"};
5173
}
1422 alexandre_ 5174
var _486=s.match(/(\-?[\d.]+)([a-z%]*)/i);
5175
if(!_486){
1318 alexandre_ 5176
return dojo.html.getUnitValue.bad;
5177
}
1422 alexandre_ 5178
return {value:Number(_486[1]),units:_486[2].toLowerCase()};
1318 alexandre_ 5179
};
5180
dojo.html.getUnitValue.bad={value:NaN,units:""};
5181
if(dojo.render.html.ie){
1422 alexandre_ 5182
dojo.html.toPixelValue=function(_487,_488){
5183
if(!_488){
1318 alexandre_ 5184
return 0;
5185
}
1422 alexandre_ 5186
if(_488.slice(-2)=="px"){
5187
return parseFloat(_488);
1318 alexandre_ 5188
}
1422 alexandre_ 5189
var _489=0;
5190
with(_487){
5191
var _48a=style.left;
5192
var _48b=runtimeStyle.left;
1318 alexandre_ 5193
runtimeStyle.left=currentStyle.left;
5194
try{
1422 alexandre_ 5195
style.left=_488||0;
5196
_489=style.pixelLeft;
5197
style.left=_48a;
5198
runtimeStyle.left=_48b;
1318 alexandre_ 5199
}
5200
catch(e){
5201
}
5202
}
1422 alexandre_ 5203
return _489;
1318 alexandre_ 5204
};
5205
}else{
1422 alexandre_ 5206
dojo.html.toPixelValue=function(_48c,_48d){
5207
return (_48d&&(_48d.slice(-2)=="px")?parseFloat(_48d):0);
1318 alexandre_ 5208
};
5209
}
1422 alexandre_ 5210
dojo.html.getPixelValue=function(node,_48f,_490){
5211
return dojo.html.toPixelValue(node,dojo.html.getComputedStyle(node,_48f));
1318 alexandre_ 5212
};
1422 alexandre_ 5213
dojo.html.setPositivePixelValue=function(node,_492,_493){
5214
if(isNaN(_493)){
1318 alexandre_ 5215
return false;
5216
}
1422 alexandre_ 5217
node.style[_492]=Math.max(0,_493)+"px";
1318 alexandre_ 5218
return true;
5219
};
5220
dojo.html.styleSheet=null;
1422 alexandre_ 5221
dojo.html.insertCssRule=function(_494,_495,_496){
1318 alexandre_ 5222
if(!dojo.html.styleSheet){
5223
if(document.createStyleSheet){
5224
dojo.html.styleSheet=document.createStyleSheet();
5225
}else{
5226
if(document.styleSheets[0]){
5227
dojo.html.styleSheet=document.styleSheets[0];
5228
}else{
5229
return null;
5230
}
5231
}
5232
}
5233
if(arguments.length<3){
5234
if(dojo.html.styleSheet.cssRules){
1422 alexandre_ 5235
_496=dojo.html.styleSheet.cssRules.length;
1318 alexandre_ 5236
}else{
5237
if(dojo.html.styleSheet.rules){
1422 alexandre_ 5238
_496=dojo.html.styleSheet.rules.length;
1318 alexandre_ 5239
}else{
5240
return null;
5241
}
5242
}
5243
}
5244
if(dojo.html.styleSheet.insertRule){
1422 alexandre_ 5245
var rule=_494+" { "+_495+" }";
5246
return dojo.html.styleSheet.insertRule(rule,_496);
1318 alexandre_ 5247
}else{
5248
if(dojo.html.styleSheet.addRule){
1422 alexandre_ 5249
return dojo.html.styleSheet.addRule(_494,_495,_496);
1318 alexandre_ 5250
}else{
5251
return null;
5252
}
5253
}
5254
};
1422 alexandre_ 5255
dojo.html.removeCssRule=function(_498){
1318 alexandre_ 5256
if(!dojo.html.styleSheet){
5257
dojo.debug("no stylesheet defined for removing rules");
5258
return false;
5259
}
5260
if(dojo.render.html.ie){
1422 alexandre_ 5261
if(!_498){
5262
_498=dojo.html.styleSheet.rules.length;
5263
dojo.html.styleSheet.removeRule(_498);
1318 alexandre_ 5264
}
5265
}else{
5266
if(document.styleSheets[0]){
1422 alexandre_ 5267
if(!_498){
5268
_498=dojo.html.styleSheet.cssRules.length;
1318 alexandre_ 5269
}
1422 alexandre_ 5270
dojo.html.styleSheet.deleteRule(_498);
1318 alexandre_ 5271
}
5272
}
5273
return true;
5274
};
5275
dojo.html._insertedCssFiles=[];
1422 alexandre_ 5276
dojo.html.insertCssFile=function(URI,doc,_49b,_49c){
1318 alexandre_ 5277
if(!URI){
5278
return;
5279
}
5280
if(!doc){
5281
doc=document;
5282
}
1422 alexandre_ 5283
var _49d=dojo.hostenv.getText(URI,false,_49c);
5284
if(_49d===null){
1318 alexandre_ 5285
return;
5286
}
1422 alexandre_ 5287
_49d=dojo.html.fixPathsInCssText(_49d,URI);
5288
if(_49b){
1318 alexandre_ 5289
var idx=-1,node,ent=dojo.html._insertedCssFiles;
5290
for(var i=0;i<ent.length;i++){
1422 alexandre_ 5291
if((ent[i].doc==doc)&&(ent[i].cssText==_49d)){
1318 alexandre_ 5292
idx=i;
5293
node=ent[i].nodeRef;
5294
break;
5295
}
5296
}
5297
if(node){
1422 alexandre_ 5298
var _4a2=doc.getElementsByTagName("style");
5299
for(var i=0;i<_4a2.length;i++){
5300
if(_4a2[i]==node){
1318 alexandre_ 5301
return;
5302
}
5303
}
5304
dojo.html._insertedCssFiles.shift(idx,1);
5305
}
5306
}
1422 alexandre_ 5307
var _4a3=dojo.html.insertCssText(_49d,doc);
5308
dojo.html._insertedCssFiles.push({"doc":doc,"cssText":_49d,"nodeRef":_4a3});
5309
if(_4a3&&djConfig.isDebug){
5310
_4a3.setAttribute("dbgHref",URI);
1318 alexandre_ 5311
}
1422 alexandre_ 5312
return _4a3;
1318 alexandre_ 5313
};
1422 alexandre_ 5314
dojo.html.insertCssText=function(_4a4,doc,URI){
5315
if(!_4a4){
1318 alexandre_ 5316
return;
5317
}
5318
if(!doc){
5319
doc=document;
5320
}
5321
if(URI){
1422 alexandre_ 5322
_4a4=dojo.html.fixPathsInCssText(_4a4,URI);
1318 alexandre_ 5323
}
1422 alexandre_ 5324
var _4a7=doc.createElement("style");
5325
_4a7.setAttribute("type","text/css");
1318 alexandre_ 5326
var head=doc.getElementsByTagName("head")[0];
5327
if(!head){
5328
dojo.debug("No head tag in document, aborting styles");
5329
return;
5330
}else{
1422 alexandre_ 5331
head.appendChild(_4a7);
1318 alexandre_ 5332
}
1422 alexandre_ 5333
if(_4a7.styleSheet){
5334
var _4a9=function(){
1318 alexandre_ 5335
try{
1422 alexandre_ 5336
_4a7.styleSheet.cssText=_4a4;
1318 alexandre_ 5337
}
5338
catch(e){
5339
dojo.debug(e);
5340
}
5341
};
1422 alexandre_ 5342
if(_4a7.styleSheet.disabled){
5343
setTimeout(_4a9,10);
1318 alexandre_ 5344
}else{
1422 alexandre_ 5345
_4a9();
1318 alexandre_ 5346
}
5347
}else{
1422 alexandre_ 5348
var _4aa=doc.createTextNode(_4a4);
5349
_4a7.appendChild(_4aa);
1318 alexandre_ 5350
}
1422 alexandre_ 5351
return _4a7;
1318 alexandre_ 5352
};
1422 alexandre_ 5353
dojo.html.fixPathsInCssText=function(_4ab,URI){
5354
if(!_4ab||!URI){
1318 alexandre_ 5355
return;
5356
}
1422 alexandre_ 5357
var _4ad,str="",url="",_4b0="[\\t\\s\\w\\(\\)\\/\\.\\\\'\"-:#=&?~]+";
5358
var _4b1=new RegExp("url\\(\\s*("+_4b0+")\\s*\\)");
5359
var _4b2=/(file|https?|ftps?):\/\//;
5360
regexTrim=new RegExp("^[\\s]*(['\"]?)("+_4b0+")\\1[\\s]*?$");
1318 alexandre_ 5361
if(dojo.render.html.ie55||dojo.render.html.ie60){
1422 alexandre_ 5362
var _4b3=new RegExp("AlphaImageLoader\\((.*)src=['\"]("+_4b0+")['\"]");
5363
while(_4ad=_4b3.exec(_4ab)){
5364
url=_4ad[2].replace(regexTrim,"$2");
5365
if(!_4b2.exec(url)){
1318 alexandre_ 5366
url=(new dojo.uri.Uri(URI,url).toString());
5367
}
1422 alexandre_ 5368
str+=_4ab.substring(0,_4ad.index)+"AlphaImageLoader("+_4ad[1]+"src='"+url+"'";
5369
_4ab=_4ab.substr(_4ad.index+_4ad[0].length);
1318 alexandre_ 5370
}
1422 alexandre_ 5371
_4ab=str+_4ab;
1318 alexandre_ 5372
str="";
5373
}
1422 alexandre_ 5374
while(_4ad=_4b1.exec(_4ab)){
5375
url=_4ad[1].replace(regexTrim,"$2");
5376
if(!_4b2.exec(url)){
1318 alexandre_ 5377
url=(new dojo.uri.Uri(URI,url).toString());
5378
}
1422 alexandre_ 5379
str+=_4ab.substring(0,_4ad.index)+"url("+url+")";
5380
_4ab=_4ab.substr(_4ad.index+_4ad[0].length);
1318 alexandre_ 5381
}
1422 alexandre_ 5382
return str+_4ab;
1318 alexandre_ 5383
};
1422 alexandre_ 5384
dojo.html.setActiveStyleSheet=function(_4b4){
1318 alexandre_ 5385
var i=0,a,els=dojo.doc().getElementsByTagName("link");
5386
while(a=els[i++]){
5387
if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")){
5388
a.disabled=true;
1422 alexandre_ 5389
if(a.getAttribute("title")==_4b4){
1318 alexandre_ 5390
a.disabled=false;
5391
}
5392
}
5393
}
5394
};
5395
dojo.html.getActiveStyleSheet=function(){
5396
var i=0,a,els=dojo.doc().getElementsByTagName("link");
5397
while(a=els[i++]){
5398
if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")&&!a.disabled){
5399
return a.getAttribute("title");
5400
}
5401
}
5402
return null;
5403
};
5404
dojo.html.getPreferredStyleSheet=function(){
5405
var i=0,a,els=dojo.doc().getElementsByTagName("link");
5406
while(a=els[i++]){
5407
if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("rel").indexOf("alt")==-1&&a.getAttribute("title")){
5408
return a.getAttribute("title");
5409
}
5410
}
5411
return null;
5412
};
5413
dojo.html.applyBrowserClass=function(node){
5414
var drh=dojo.render.html;
1422 alexandre_ 5415
var _4c0={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};
5416
for(var p in _4c0){
5417
if(_4c0[p]){
1318 alexandre_ 5418
dojo.html.addClass(node,p);
5419
}
5420
}
5421
};
5422
dojo.provide("dojo.html.display");
1422 alexandre_ 5423
dojo.html._toggle=function(node,_4c3,_4c4){
1318 alexandre_ 5424
node=dojo.byId(node);
1422 alexandre_ 5425
_4c4(node,!_4c3(node));
5426
return _4c3(node);
1318 alexandre_ 5427
};
5428
dojo.html.show=function(node){
5429
node=dojo.byId(node);
5430
if(dojo.html.getStyleProperty(node,"display")=="none"){
5431
dojo.html.setStyle(node,"display",(node.dojoDisplayCache||""));
5432
node.dojoDisplayCache=undefined;
5433
}
5434
};
5435
dojo.html.hide=function(node){
5436
node=dojo.byId(node);
5437
if(typeof node["dojoDisplayCache"]=="undefined"){
5438
var d=dojo.html.getStyleProperty(node,"display");
5439
if(d!="none"){
5440
node.dojoDisplayCache=d;
5441
}
5442
}
5443
dojo.html.setStyle(node,"display","none");
5444
};
1422 alexandre_ 5445
dojo.html.setShowing=function(node,_4c9){
5446
dojo.html[(_4c9?"show":"hide")](node);
1318 alexandre_ 5447
};
5448
dojo.html.isShowing=function(node){
5449
return (dojo.html.getStyleProperty(node,"display")!="none");
5450
};
5451
dojo.html.toggleShowing=function(node){
5452
return dojo.html._toggle(node,dojo.html.isShowing,dojo.html.setShowing);
5453
};
5454
dojo.html.displayMap={tr:"",td:"",th:"",img:"inline",span:"inline",input:"inline",button:"inline"};
5455
dojo.html.suggestDisplayByTagName=function(node){
5456
node=dojo.byId(node);
5457
if(node&&node.tagName){
5458
var tag=node.tagName.toLowerCase();
5459
return (tag in dojo.html.displayMap?dojo.html.displayMap[tag]:"block");
5460
}
5461
};
1422 alexandre_ 5462
dojo.html.setDisplay=function(node,_4cf){
5463
dojo.html.setStyle(node,"display",((_4cf instanceof String||typeof _4cf=="string")?_4cf:(_4cf?dojo.html.suggestDisplayByTagName(node):"none")));
1318 alexandre_ 5464
};
5465
dojo.html.isDisplayed=function(node){
5466
return (dojo.html.getComputedStyle(node,"display")!="none");
5467
};
5468
dojo.html.toggleDisplay=function(node){
5469
return dojo.html._toggle(node,dojo.html.isDisplayed,dojo.html.setDisplay);
5470
};
1422 alexandre_ 5471
dojo.html.setVisibility=function(node,_4d3){
5472
dojo.html.setStyle(node,"visibility",((_4d3 instanceof String||typeof _4d3=="string")?_4d3:(_4d3?"visible":"hidden")));
1318 alexandre_ 5473
};
5474
dojo.html.isVisible=function(node){
5475
return (dojo.html.getComputedStyle(node,"visibility")!="hidden");
5476
};
5477
dojo.html.toggleVisibility=function(node){
5478
return dojo.html._toggle(node,dojo.html.isVisible,dojo.html.setVisibility);
5479
};
1422 alexandre_ 5480
dojo.html.setOpacity=function(node,_4d7,_4d8){
1318 alexandre_ 5481
node=dojo.byId(node);
5482
var h=dojo.render.html;
1422 alexandre_ 5483
if(!_4d8){
5484
if(_4d7>=1){
1318 alexandre_ 5485
if(h.ie){
5486
dojo.html.clearOpacity(node);
5487
return;
5488
}else{
1422 alexandre_ 5489
_4d7=0.999999;
1318 alexandre_ 5490
}
5491
}else{
1422 alexandre_ 5492
if(_4d7<0){
5493
_4d7=0;
1318 alexandre_ 5494
}
5495
}
5496
}
5497
if(h.ie){
5498
if(node.nodeName.toLowerCase()=="tr"){
5499
var tds=node.getElementsByTagName("td");
5500
for(var x=0;x<tds.length;x++){
1422 alexandre_ 5501
tds[x].style.filter="Alpha(Opacity="+_4d7*100+")";
1318 alexandre_ 5502
}
5503
}
1422 alexandre_ 5504
node.style.filter="Alpha(Opacity="+_4d7*100+")";
1318 alexandre_ 5505
}else{
5506
if(h.moz){
1422 alexandre_ 5507
node.style.opacity=_4d7;
5508
node.style.MozOpacity=_4d7;
1318 alexandre_ 5509
}else{
5510
if(h.safari){
1422 alexandre_ 5511
node.style.opacity=_4d7;
5512
node.style.KhtmlOpacity=_4d7;
1318 alexandre_ 5513
}else{
1422 alexandre_ 5514
node.style.opacity=_4d7;
1318 alexandre_ 5515
}
5516
}
5517
}
5518
};
5519
dojo.html.clearOpacity=function(node){
5520
node=dojo.byId(node);
5521
var ns=node.style;
5522
var h=dojo.render.html;
5523
if(h.ie){
5524
try{
5525
if(node.filters&&node.filters.alpha){
5526
ns.filter="";
5527
}
5528
}
5529
catch(e){
5530
}
5531
}else{
5532
if(h.moz){
5533
ns.opacity=1;
5534
ns.MozOpacity=1;
5535
}else{
5536
if(h.safari){
5537
ns.opacity=1;
5538
ns.KhtmlOpacity=1;
5539
}else{
5540
ns.opacity=1;
5541
}
5542
}
5543
}
5544
};
5545
dojo.html.getOpacity=function(node){
5546
node=dojo.byId(node);
5547
var h=dojo.render.html;
5548
if(h.ie){
5549
var opac=(node.filters&&node.filters.alpha&&typeof node.filters.alpha.opacity=="number"?node.filters.alpha.opacity:100)/100;
5550
}else{
5551
var opac=node.style.opacity||node.style.MozOpacity||node.style.KhtmlOpacity||1;
5552
}
5553
return opac>=0.999999?1:Number(opac);
5554
};
5555
dojo.provide("dojo.html.color");
5556
dojo.html.getBackgroundColor=function(node){
5557
node=dojo.byId(node);
1422 alexandre_ 5558
var _4e3;
1318 alexandre_ 5559
do{
1422 alexandre_ 5560
_4e3=dojo.html.getStyle(node,"background-color");
5561
if(_4e3.toLowerCase()=="rgba(0, 0, 0, 0)"){
5562
_4e3="transparent";
1318 alexandre_ 5563
}
5564
if(node==document.getElementsByTagName("body")[0]){
5565
node=null;
5566
break;
5567
}
5568
node=node.parentNode;
1422 alexandre_ 5569
}while(node&&dojo.lang.inArray(["transparent",""],_4e3));
5570
if(_4e3=="transparent"){
5571
_4e3=[255,255,255,0];
1318 alexandre_ 5572
}else{
1422 alexandre_ 5573
_4e3=dojo.gfx.color.extractRGB(_4e3);
1318 alexandre_ 5574
}
1422 alexandre_ 5575
return _4e3;
1318 alexandre_ 5576
};
5577
dojo.provide("dojo.html.layout");
5578
dojo.html.sumAncestorProperties=function(node,prop){
5579
node=dojo.byId(node);
5580
if(!node){
5581
return 0;
5582
}
1422 alexandre_ 5583
var _4e6=0;
1318 alexandre_ 5584
while(node){
5585
if(dojo.html.getComputedStyle(node,"position")=="fixed"){
5586
return 0;
5587
}
5588
var val=node[prop];
5589
if(val){
1422 alexandre_ 5590
_4e6+=val-0;
1318 alexandre_ 5591
if(node==dojo.body()){
5592
break;
5593
}
5594
}
5595
node=node.parentNode;
5596
}
1422 alexandre_ 5597
return _4e6;
1318 alexandre_ 5598
};
1422 alexandre_ 5599
dojo.html.setStyleAttributes=function(node,_4e9){
1318 alexandre_ 5600
node=dojo.byId(node);
1422 alexandre_ 5601
var _4ea=_4e9.replace(/(;)?\s*$/,"").split(";");
5602
for(var i=0;i<_4ea.length;i++){
5603
var _4ec=_4ea[i].split(":");
5604
var name=_4ec[0].replace(/\s*$/,"").replace(/^\s*/,"").toLowerCase();
5605
var _4ee=_4ec[1].replace(/\s*$/,"").replace(/^\s*/,"");
1318 alexandre_ 5606
switch(name){
5607
case "opacity":
1422 alexandre_ 5608
dojo.html.setOpacity(node,_4ee);
1318 alexandre_ 5609
break;
5610
case "content-height":
1422 alexandre_ 5611
dojo.html.setContentBox(node,{height:_4ee});
1318 alexandre_ 5612
break;
5613
case "content-width":
1422 alexandre_ 5614
dojo.html.setContentBox(node,{width:_4ee});
1318 alexandre_ 5615
break;
5616
case "outer-height":
1422 alexandre_ 5617
dojo.html.setMarginBox(node,{height:_4ee});
1318 alexandre_ 5618
break;
5619
case "outer-width":
1422 alexandre_ 5620
dojo.html.setMarginBox(node,{width:_4ee});
1318 alexandre_ 5621
break;
5622
default:
1422 alexandre_ 5623
node.style[dojo.html.toCamelCase(name)]=_4ee;
1318 alexandre_ 5624
}
5625
}
5626
};
5627
dojo.html.boxSizing={MARGIN_BOX:"margin-box",BORDER_BOX:"border-box",PADDING_BOX:"padding-box",CONTENT_BOX:"content-box"};
1422 alexandre_ 5628
dojo.html.getAbsolutePosition=dojo.html.abs=function(node,_4f0,_4f1){
1318 alexandre_ 5629
node=dojo.byId(node,node.ownerDocument);
5630
var ret={x:0,y:0};
5631
var bs=dojo.html.boxSizing;
1422 alexandre_ 5632
if(!_4f1){
5633
_4f1=bs.CONTENT_BOX;
1318 alexandre_ 5634
}
1422 alexandre_ 5635
var _4f4=2;
5636
var _4f5;
5637
switch(_4f1){
1318 alexandre_ 5638
case bs.MARGIN_BOX:
1422 alexandre_ 5639
_4f5=3;
1318 alexandre_ 5640
break;
5641
case bs.BORDER_BOX:
1422 alexandre_ 5642
_4f5=2;
1318 alexandre_ 5643
break;
5644
case bs.PADDING_BOX:
5645
default:
1422 alexandre_ 5646
_4f5=1;
1318 alexandre_ 5647
break;
5648
case bs.CONTENT_BOX:
1422 alexandre_ 5649
_4f5=0;
1318 alexandre_ 5650
break;
5651
}
5652
var h=dojo.render.html;
5653
var db=document["body"]||document["documentElement"];
5654
if(h.ie){
5655
with(node.getBoundingClientRect()){
5656
ret.x=left-2;
5657
ret.y=top-2;
5658
}
5659
}else{
5660
if(document.getBoxObjectFor){
1422 alexandre_ 5661
_4f4=1;
1318 alexandre_ 5662
try{
5663
var bo=document.getBoxObjectFor(node);
5664
ret.x=bo.x-dojo.html.sumAncestorProperties(node,"scrollLeft");
5665
ret.y=bo.y-dojo.html.sumAncestorProperties(node,"scrollTop");
5666
}
5667
catch(e){
5668
}
5669
}else{
5670
if(node["offsetParent"]){
1422 alexandre_ 5671
var _4f9;
1318 alexandre_ 5672
if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){
1422 alexandre_ 5673
_4f9=db;
1318 alexandre_ 5674
}else{
1422 alexandre_ 5675
_4f9=db.parentNode;
1318 alexandre_ 5676
}
5677
if(node.parentNode!=db){
5678
var nd=node;
5679
if(dojo.render.html.opera){
5680
nd=db;
5681
}
5682
ret.x-=dojo.html.sumAncestorProperties(nd,"scrollLeft");
5683
ret.y-=dojo.html.sumAncestorProperties(nd,"scrollTop");
5684
}
1422 alexandre_ 5685
var _4fb=node;
1318 alexandre_ 5686
do{
1422 alexandre_ 5687
var n=_4fb["offsetLeft"];
1318 alexandre_ 5688
if(!h.opera||n>0){
5689
ret.x+=isNaN(n)?0:n;
5690
}
1422 alexandre_ 5691
var m=_4fb["offsetTop"];
1318 alexandre_ 5692
ret.y+=isNaN(m)?0:m;
1422 alexandre_ 5693
_4fb=_4fb.offsetParent;
5694
}while((_4fb!=_4f9)&&(_4fb!=null));
1318 alexandre_ 5695
}else{
5696
if(node["x"]&&node["y"]){
5697
ret.x+=isNaN(node.x)?0:node.x;
5698
ret.y+=isNaN(node.y)?0:node.y;
5699
}
5700
}
5701
}
5702
}
1422 alexandre_ 5703
if(_4f0){
5704
var _4fe=dojo.html.getScroll();
5705
ret.y+=_4fe.top;
5706
ret.x+=_4fe.left;
1318 alexandre_ 5707
}
1422 alexandre_ 5708
var _4ff=[dojo.html.getPaddingExtent,dojo.html.getBorderExtent,dojo.html.getMarginExtent];
5709
if(_4f4>_4f5){
5710
for(var i=_4f5;i<_4f4;++i){
5711
ret.y+=_4ff[i](node,"top");
5712
ret.x+=_4ff[i](node,"left");
1318 alexandre_ 5713
}
5714
}else{
1422 alexandre_ 5715
if(_4f4<_4f5){
5716
for(var i=_4f5;i>_4f4;--i){
5717
ret.y-=_4ff[i-1](node,"top");
5718
ret.x-=_4ff[i-1](node,"left");
1318 alexandre_ 5719
}
5720
}
5721
}
5722
ret.top=ret.y;
5723
ret.left=ret.x;
5724
return ret;
5725
};
5726
dojo.html.isPositionAbsolute=function(node){
5727
return (dojo.html.getComputedStyle(node,"position")=="absolute");
5728
};
1422 alexandre_ 5729
dojo.html._sumPixelValues=function(node,_503,_504){
5730
var _505=0;
5731
for(var x=0;x<_503.length;x++){
5732
_505+=dojo.html.getPixelValue(node,_503[x],_504);
1318 alexandre_ 5733
}
1422 alexandre_ 5734
return _505;
1318 alexandre_ 5735
};
5736
dojo.html.getMargin=function(node){
5737
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"))};
5738
};
5739
dojo.html.getBorder=function(node){
5740
return {width:dojo.html.getBorderExtent(node,"left")+dojo.html.getBorderExtent(node,"right"),height:dojo.html.getBorderExtent(node,"top")+dojo.html.getBorderExtent(node,"bottom")};
5741
};
5742
dojo.html.getBorderExtent=function(node,side){
5743
return (dojo.html.getStyle(node,"border-"+side+"-style")=="none"?0:dojo.html.getPixelValue(node,"border-"+side+"-width"));
5744
};
5745
dojo.html.getMarginExtent=function(node,side){
5746
return dojo.html._sumPixelValues(node,["margin-"+side],dojo.html.isPositionAbsolute(node));
5747
};
5748
dojo.html.getPaddingExtent=function(node,side){
5749
return dojo.html._sumPixelValues(node,["padding-"+side],true);
5750
};
5751
dojo.html.getPadding=function(node){
5752
return {width:dojo.html._sumPixelValues(node,["padding-left","padding-right"],true),height:dojo.html._sumPixelValues(node,["padding-top","padding-bottom"],true)};
5753
};
5754
dojo.html.getPadBorder=function(node){
5755
var pad=dojo.html.getPadding(node);
1422 alexandre_ 5756
var _512=dojo.html.getBorder(node);
5757
return {width:pad.width+_512.width,height:pad.height+_512.height};
1318 alexandre_ 5758
};
5759
dojo.html.getBoxSizing=function(node){
5760
var h=dojo.render.html;
5761
var bs=dojo.html.boxSizing;
5762
if(((h.ie)||(h.opera))&&node.nodeName.toLowerCase()!="img"){
5763
var cm=document["compatMode"];
5764
if((cm=="BackCompat")||(cm=="QuirksMode")){
5765
return bs.BORDER_BOX;
5766
}else{
5767
return bs.CONTENT_BOX;
5768
}
5769
}else{
5770
if(arguments.length==0){
5771
node=document.documentElement;
5772
}
1422 alexandre_ 5773
var _517;
1318 alexandre_ 5774
if(!h.ie){
1422 alexandre_ 5775
_517=dojo.html.getStyle(node,"-moz-box-sizing");
5776
if(!_517){
5777
_517=dojo.html.getStyle(node,"box-sizing");
1318 alexandre_ 5778
}
5779
}
1422 alexandre_ 5780
return (_517?_517:bs.CONTENT_BOX);
1318 alexandre_ 5781
}
5782
};
5783
dojo.html.isBorderBox=function(node){
5784
return (dojo.html.getBoxSizing(node)==dojo.html.boxSizing.BORDER_BOX);
5785
};
5786
dojo.html.getBorderBox=function(node){
5787
node=dojo.byId(node);
5788
return {width:node.offsetWidth,height:node.offsetHeight};
5789
};
5790
dojo.html.getPaddingBox=function(node){
5791
var box=dojo.html.getBorderBox(node);
1422 alexandre_ 5792
var _51c=dojo.html.getBorder(node);
5793
return {width:box.width-_51c.width,height:box.height-_51c.height};
1318 alexandre_ 5794
};
5795
dojo.html.getContentBox=function(node){
5796
node=dojo.byId(node);
1422 alexandre_ 5797
var _51e=dojo.html.getPadBorder(node);
5798
return {width:node.offsetWidth-_51e.width,height:node.offsetHeight-_51e.height};
1318 alexandre_ 5799
};
5800
dojo.html.setContentBox=function(node,args){
5801
node=dojo.byId(node);
1422 alexandre_ 5802
var _521=0;
5803
var _522=0;
1318 alexandre_ 5804
var isbb=dojo.html.isBorderBox(node);
1422 alexandre_ 5805
var _524=(isbb?dojo.html.getPadBorder(node):{width:0,height:0});
1318 alexandre_ 5806
var ret={};
5807
if(typeof args.width!="undefined"){
1422 alexandre_ 5808
_521=args.width+_524.width;
5809
ret.width=dojo.html.setPositivePixelValue(node,"width",_521);
1318 alexandre_ 5810
}
5811
if(typeof args.height!="undefined"){
1422 alexandre_ 5812
_522=args.height+_524.height;
5813
ret.height=dojo.html.setPositivePixelValue(node,"height",_522);
1318 alexandre_ 5814
}
5815
return ret;
5816
};
5817
dojo.html.getMarginBox=function(node){
1422 alexandre_ 5818
var _527=dojo.html.getBorderBox(node);
5819
var _528=dojo.html.getMargin(node);
5820
return {width:_527.width+_528.width,height:_527.height+_528.height};
1318 alexandre_ 5821
};
5822
dojo.html.setMarginBox=function(node,args){
5823
node=dojo.byId(node);
1422 alexandre_ 5824
var _52b=0;
5825
var _52c=0;
1318 alexandre_ 5826
var isbb=dojo.html.isBorderBox(node);
1422 alexandre_ 5827
var _52e=(!isbb?dojo.html.getPadBorder(node):{width:0,height:0});
5828
var _52f=dojo.html.getMargin(node);
1318 alexandre_ 5829
var ret={};
5830
if(typeof args.width!="undefined"){
1422 alexandre_ 5831
_52b=args.width-_52e.width;
5832
_52b-=_52f.width;
5833
ret.width=dojo.html.setPositivePixelValue(node,"width",_52b);
1318 alexandre_ 5834
}
5835
if(typeof args.height!="undefined"){
1422 alexandre_ 5836
_52c=args.height-_52e.height;
5837
_52c-=_52f.height;
5838
ret.height=dojo.html.setPositivePixelValue(node,"height",_52c);
1318 alexandre_ 5839
}
5840
return ret;
5841
};
5842
dojo.html.getElementBox=function(node,type){
5843
var bs=dojo.html.boxSizing;
5844
switch(type){
5845
case bs.MARGIN_BOX:
5846
return dojo.html.getMarginBox(node);
5847
case bs.BORDER_BOX:
5848
return dojo.html.getBorderBox(node);
5849
case bs.PADDING_BOX:
5850
return dojo.html.getPaddingBox(node);
5851
case bs.CONTENT_BOX:
5852
default:
5853
return dojo.html.getContentBox(node);
5854
}
5855
};
1422 alexandre_ 5856
dojo.html.toCoordinateObject=dojo.html.toCoordinateArray=function(_534,_535,_536){
5857
if(_534 instanceof Array||typeof _534=="array"){
1318 alexandre_ 5858
dojo.deprecated("dojo.html.toCoordinateArray","use dojo.html.toCoordinateObject({left: , top: , width: , height: }) instead","0.5");
1422 alexandre_ 5859
while(_534.length<4){
5860
_534.push(0);
1318 alexandre_ 5861
}
1422 alexandre_ 5862
while(_534.length>4){
5863
_534.pop();
1318 alexandre_ 5864
}
1422 alexandre_ 5865
var ret={left:_534[0],top:_534[1],width:_534[2],height:_534[3]};
1318 alexandre_ 5866
}else{
1422 alexandre_ 5867
if(!_534.nodeType&&!(_534 instanceof String||typeof _534=="string")&&("width" in _534||"height" in _534||"left" in _534||"x" in _534||"top" in _534||"y" in _534)){
5868
var ret={left:_534.left||_534.x||0,top:_534.top||_534.y||0,width:_534.width||0,height:_534.height||0};
1318 alexandre_ 5869
}else{
1422 alexandre_ 5870
var node=dojo.byId(_534);
5871
var pos=dojo.html.abs(node,_535,_536);
5872
var _53a=dojo.html.getMarginBox(node);
5873
var ret={left:pos.left,top:pos.top,width:_53a.width,height:_53a.height};
1318 alexandre_ 5874
}
5875
}
5876
ret.x=ret.left;
5877
ret.y=ret.top;
5878
return ret;
5879
};
1422 alexandre_ 5880
dojo.html.setMarginBoxWidth=dojo.html.setOuterWidth=function(node,_53c){
1318 alexandre_ 5881
return dojo.html._callDeprecated("setMarginBoxWidth","setMarginBox",arguments,"width");
5882
};
5883
dojo.html.setMarginBoxHeight=dojo.html.setOuterHeight=function(){
5884
return dojo.html._callDeprecated("setMarginBoxHeight","setMarginBox",arguments,"height");
5885
};
5886
dojo.html.getMarginBoxWidth=dojo.html.getOuterWidth=function(){
5887
return dojo.html._callDeprecated("getMarginBoxWidth","getMarginBox",arguments,null,"width");
5888
};
5889
dojo.html.getMarginBoxHeight=dojo.html.getOuterHeight=function(){
5890
return dojo.html._callDeprecated("getMarginBoxHeight","getMarginBox",arguments,null,"height");
5891
};
1422 alexandre_ 5892
dojo.html.getTotalOffset=function(node,type,_53f){
1318 alexandre_ 5893
return dojo.html._callDeprecated("getTotalOffset","getAbsolutePosition",arguments,null,type);
5894
};
1422 alexandre_ 5895
dojo.html.getAbsoluteX=function(node,_541){
1318 alexandre_ 5896
return dojo.html._callDeprecated("getAbsoluteX","getAbsolutePosition",arguments,null,"x");
5897
};
1422 alexandre_ 5898
dojo.html.getAbsoluteY=function(node,_543){
1318 alexandre_ 5899
return dojo.html._callDeprecated("getAbsoluteY","getAbsolutePosition",arguments,null,"y");
5900
};
1422 alexandre_ 5901
dojo.html.totalOffsetLeft=function(node,_545){
1318 alexandre_ 5902
return dojo.html._callDeprecated("totalOffsetLeft","getAbsolutePosition",arguments,null,"left");
5903
};
1422 alexandre_ 5904
dojo.html.totalOffsetTop=function(node,_547){
1318 alexandre_ 5905
return dojo.html._callDeprecated("totalOffsetTop","getAbsolutePosition",arguments,null,"top");
5906
};
5907
dojo.html.getMarginWidth=function(node){
5908
return dojo.html._callDeprecated("getMarginWidth","getMargin",arguments,null,"width");
5909
};
5910
dojo.html.getMarginHeight=function(node){
5911
return dojo.html._callDeprecated("getMarginHeight","getMargin",arguments,null,"height");
5912
};
5913
dojo.html.getBorderWidth=function(node){
5914
return dojo.html._callDeprecated("getBorderWidth","getBorder",arguments,null,"width");
5915
};
5916
dojo.html.getBorderHeight=function(node){
5917
return dojo.html._callDeprecated("getBorderHeight","getBorder",arguments,null,"height");
5918
};
5919
dojo.html.getPaddingWidth=function(node){
5920
return dojo.html._callDeprecated("getPaddingWidth","getPadding",arguments,null,"width");
5921
};
5922
dojo.html.getPaddingHeight=function(node){
5923
return dojo.html._callDeprecated("getPaddingHeight","getPadding",arguments,null,"height");
5924
};
5925
dojo.html.getPadBorderWidth=function(node){
5926
return dojo.html._callDeprecated("getPadBorderWidth","getPadBorder",arguments,null,"width");
5927
};
5928
dojo.html.getPadBorderHeight=function(node){
5929
return dojo.html._callDeprecated("getPadBorderHeight","getPadBorder",arguments,null,"height");
5930
};
5931
dojo.html.getBorderBoxWidth=dojo.html.getInnerWidth=function(){
5932
return dojo.html._callDeprecated("getBorderBoxWidth","getBorderBox",arguments,null,"width");
5933
};
5934
dojo.html.getBorderBoxHeight=dojo.html.getInnerHeight=function(){
5935
return dojo.html._callDeprecated("getBorderBoxHeight","getBorderBox",arguments,null,"height");
5936
};
5937
dojo.html.getContentBoxWidth=dojo.html.getContentWidth=function(){
5938
return dojo.html._callDeprecated("getContentBoxWidth","getContentBox",arguments,null,"width");
5939
};
5940
dojo.html.getContentBoxHeight=dojo.html.getContentHeight=function(){
5941
return dojo.html._callDeprecated("getContentBoxHeight","getContentBox",arguments,null,"height");
5942
};
1422 alexandre_ 5943
dojo.html.setContentBoxWidth=dojo.html.setContentWidth=function(node,_551){
1318 alexandre_ 5944
return dojo.html._callDeprecated("setContentBoxWidth","setContentBox",arguments,"width");
5945
};
1422 alexandre_ 5946
dojo.html.setContentBoxHeight=dojo.html.setContentHeight=function(node,_553){
1318 alexandre_ 5947
return dojo.html._callDeprecated("setContentBoxHeight","setContentBox",arguments,"height");
5948
};
5949
dojo.provide("dojo.lfx.html");
1422 alexandre_ 5950
dojo.lfx.html._byId=function(_554){
5951
if(!_554){
1318 alexandre_ 5952
return [];
5953
}
1422 alexandre_ 5954
if(dojo.lang.isArrayLike(_554)){
5955
if(!_554.alreadyChecked){
1318 alexandre_ 5956
var n=[];
1422 alexandre_ 5957
dojo.lang.forEach(_554,function(node){
1318 alexandre_ 5958
n.push(dojo.byId(node));
5959
});
5960
n.alreadyChecked=true;
5961
return n;
5962
}else{
1422 alexandre_ 5963
return _554;
1318 alexandre_ 5964
}
5965
}else{
5966
var n=[];
1422 alexandre_ 5967
n.push(dojo.byId(_554));
1318 alexandre_ 5968
n.alreadyChecked=true;
5969
return n;
5970
}
5971
};
1422 alexandre_ 5972
dojo.lfx.html.propertyAnimation=function(_557,_558,_559,_55a,_55b){
5973
_557=dojo.lfx.html._byId(_557);
5974
var _55c={"propertyMap":_558,"nodes":_557,"duration":_559,"easing":_55a||dojo.lfx.easeDefault};
5975
var _55d=function(args){
1318 alexandre_ 5976
if(args.nodes.length==1){
5977
var pm=args.propertyMap;
5978
if(!dojo.lang.isArray(args.propertyMap)){
5979
var parr=[];
1422 alexandre_ 5980
for(var _561 in pm){
5981
pm[_561].property=_561;
5982
parr.push(pm[_561]);
1318 alexandre_ 5983
}
5984
pm=args.propertyMap=parr;
5985
}
5986
dojo.lang.forEach(pm,function(prop){
5987
if(dj_undef("start",prop)){
5988
if(prop.property!="opacity"){
5989
prop.start=parseInt(dojo.html.getComputedStyle(args.nodes[0],prop.property));
5990
}else{
5991
prop.start=dojo.html.getOpacity(args.nodes[0]);
5992
}
5993
}
5994
});
5995
}
5996
};
1422 alexandre_ 5997
var _563=function(_564){
5998
var _565=[];
5999
dojo.lang.forEach(_564,function(c){
6000
_565.push(Math.round(c));
1318 alexandre_ 6001
});
1422 alexandre_ 6002
return _565;
1318 alexandre_ 6003
};
1422 alexandre_ 6004
var _567=function(n,_569){
1318 alexandre_ 6005
n=dojo.byId(n);
6006
if(!n||!n.style){
6007
return;
6008
}
1422 alexandre_ 6009
for(var s in _569){
1318 alexandre_ 6010
try{
6011
if(s=="opacity"){
1422 alexandre_ 6012
dojo.html.setOpacity(n,_569[s]);
1318 alexandre_ 6013
}else{
1422 alexandre_ 6014
n.style[s]=_569[s];
1318 alexandre_ 6015
}
6016
}
6017
catch(e){
6018
dojo.debug(e);
6019
}
6020
}
6021
};
1422 alexandre_ 6022
var _56b=function(_56c){
6023
this._properties=_56c;
6024
this.diffs=new Array(_56c.length);
6025
dojo.lang.forEach(_56c,function(prop,i){
1318 alexandre_ 6026
if(dojo.lang.isFunction(prop.start)){
6027
prop.start=prop.start(prop,i);
6028
}
6029
if(dojo.lang.isFunction(prop.end)){
6030
prop.end=prop.end(prop,i);
6031
}
6032
if(dojo.lang.isArray(prop.start)){
6033
this.diffs[i]=null;
6034
}else{
6035
if(prop.start instanceof dojo.gfx.color.Color){
6036
prop.startRgb=prop.start.toRgb();
6037
prop.endRgb=prop.end.toRgb();
6038
}else{
6039
this.diffs[i]=prop.end-prop.start;
6040
}
6041
}
6042
},this);
6043
this.getValue=function(n){
6044
var ret={};
6045
dojo.lang.forEach(this._properties,function(prop,i){
1422 alexandre_ 6046
var _573=null;
1318 alexandre_ 6047
if(dojo.lang.isArray(prop.start)){
6048
}else{
6049
if(prop.start instanceof dojo.gfx.color.Color){
1422 alexandre_ 6050
_573=(prop.units||"rgb")+"(";
1318 alexandre_ 6051
for(var j=0;j<prop.startRgb.length;j++){
1422 alexandre_ 6052
_573+=Math.round(((prop.endRgb[j]-prop.startRgb[j])*n)+prop.startRgb[j])+(j<prop.startRgb.length-1?",":"");
1318 alexandre_ 6053
}
1422 alexandre_ 6054
_573+=")";
1318 alexandre_ 6055
}else{
1422 alexandre_ 6056
_573=((this.diffs[i])*n)+prop.start+(prop.property!="opacity"?prop.units||"px":"");
1318 alexandre_ 6057
}
6058
}
1422 alexandre_ 6059
ret[dojo.html.toCamelCase(prop.property)]=_573;
1318 alexandre_ 6060
},this);
6061
return ret;
6062
};
6063
};
6064
var anim=new dojo.lfx.Animation({beforeBegin:function(){
1422 alexandre_ 6065
_55d(_55c);
6066
anim.curve=new _56b(_55c.propertyMap);
6067
},onAnimate:function(_576){
6068
dojo.lang.forEach(_55c.nodes,function(node){
6069
_567(node,_576);
1318 alexandre_ 6070
});
1422 alexandre_ 6071
}},_55c.duration,null,_55c.easing);
6072
if(_55b){
6073
for(var x in _55b){
6074
if(dojo.lang.isFunction(_55b[x])){
6075
anim.connect(x,anim,_55b[x]);
1318 alexandre_ 6076
}
6077
}
6078
}
6079
return anim;
6080
};
1422 alexandre_ 6081
dojo.lfx.html._makeFadeable=function(_579){
6082
var _57a=function(node){
1318 alexandre_ 6083
if(dojo.render.html.ie){
6084
if((node.style.zoom.length==0)&&(dojo.html.getStyle(node,"zoom")=="normal")){
6085
node.style.zoom="1";
6086
}
6087
if((node.style.width.length==0)&&(dojo.html.getStyle(node,"width")=="auto")){
6088
node.style.width="auto";
6089
}
6090
}
6091
};
1422 alexandre_ 6092
if(dojo.lang.isArrayLike(_579)){
6093
dojo.lang.forEach(_579,_57a);
1318 alexandre_ 6094
}else{
1422 alexandre_ 6095
_57a(_579);
1318 alexandre_ 6096
}
6097
};
1422 alexandre_ 6098
dojo.lfx.html.fade=function(_57c,_57d,_57e,_57f,_580){
6099
_57c=dojo.lfx.html._byId(_57c);
6100
var _581={property:"opacity"};
6101
if(!dj_undef("start",_57d)){
6102
_581.start=_57d.start;
1318 alexandre_ 6103
}else{
1422 alexandre_ 6104
_581.start=function(){
6105
return dojo.html.getOpacity(_57c[0]);
1318 alexandre_ 6106
};
6107
}
1422 alexandre_ 6108
if(!dj_undef("end",_57d)){
6109
_581.end=_57d.end;
1318 alexandre_ 6110
}else{
6111
dojo.raise("dojo.lfx.html.fade needs an end value");
6112
}
1422 alexandre_ 6113
var anim=dojo.lfx.propertyAnimation(_57c,[_581],_57e,_57f);
1318 alexandre_ 6114
anim.connect("beforeBegin",function(){
1422 alexandre_ 6115
dojo.lfx.html._makeFadeable(_57c);
1318 alexandre_ 6116
});
1422 alexandre_ 6117
if(_580){
1318 alexandre_ 6118
anim.connect("onEnd",function(){
1422 alexandre_ 6119
_580(_57c,anim);
1318 alexandre_ 6120
});
6121
}
6122
return anim;
6123
};
1422 alexandre_ 6124
dojo.lfx.html.fadeIn=function(_583,_584,_585,_586){
6125
return dojo.lfx.html.fade(_583,{end:1},_584,_585,_586);
1318 alexandre_ 6126
};
1422 alexandre_ 6127
dojo.lfx.html.fadeOut=function(_587,_588,_589,_58a){
6128
return dojo.lfx.html.fade(_587,{end:0},_588,_589,_58a);
1318 alexandre_ 6129
};
1422 alexandre_ 6130
dojo.lfx.html.fadeShow=function(_58b,_58c,_58d,_58e){
6131
_58b=dojo.lfx.html._byId(_58b);
6132
dojo.lang.forEach(_58b,function(node){
1318 alexandre_ 6133
dojo.html.setOpacity(node,0);
6134
});
1422 alexandre_ 6135
var anim=dojo.lfx.html.fadeIn(_58b,_58c,_58d,_58e);
1318 alexandre_ 6136
anim.connect("beforeBegin",function(){
1422 alexandre_ 6137
if(dojo.lang.isArrayLike(_58b)){
6138
dojo.lang.forEach(_58b,dojo.html.show);
1318 alexandre_ 6139
}else{
1422 alexandre_ 6140
dojo.html.show(_58b);
1318 alexandre_ 6141
}
6142
});
6143
return anim;
6144
};
1422 alexandre_ 6145
dojo.lfx.html.fadeHide=function(_591,_592,_593,_594){
6146
var anim=dojo.lfx.html.fadeOut(_591,_592,_593,function(){
6147
if(dojo.lang.isArrayLike(_591)){
6148
dojo.lang.forEach(_591,dojo.html.hide);
1318 alexandre_ 6149
}else{
1422 alexandre_ 6150
dojo.html.hide(_591);
1318 alexandre_ 6151
}
1422 alexandre_ 6152
if(_594){
6153
_594(_591,anim);
1318 alexandre_ 6154
}
6155
});
6156
return anim;
6157
};
1422 alexandre_ 6158
dojo.lfx.html.wipeIn=function(_596,_597,_598,_599){
6159
_596=dojo.lfx.html._byId(_596);
6160
var _59a=[];
6161
dojo.lang.forEach(_596,function(node){
6162
var _59c={};
6163
var _59d,_59e,_59f;
1318 alexandre_ 6164
with(node.style){
1422 alexandre_ 6165
_59d=top;
6166
_59e=left;
6167
_59f=position;
1318 alexandre_ 6168
top="-9999px";
6169
left="-9999px";
6170
position="absolute";
6171
display="";
6172
}
1422 alexandre_ 6173
var _5a0=dojo.html.getBorderBox(node).height;
1318 alexandre_ 6174
with(node.style){
1422 alexandre_ 6175
top=_59d;
6176
left=_59e;
6177
position=_59f;
1318 alexandre_ 6178
display="none";
6179
}
6180
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:1,end:function(){
1422 alexandre_ 6181
return _5a0;
6182
}}},_597,_598);
1318 alexandre_ 6183
anim.connect("beforeBegin",function(){
1422 alexandre_ 6184
_59c.overflow=node.style.overflow;
6185
_59c.height=node.style.height;
1318 alexandre_ 6186
with(node.style){
6187
overflow="hidden";
6188
height="1px";
6189
}
6190
dojo.html.show(node);
6191
});
6192
anim.connect("onEnd",function(){
6193
with(node.style){
1422 alexandre_ 6194
overflow=_59c.overflow;
6195
height=_59c.height;
1318 alexandre_ 6196
}
1422 alexandre_ 6197
if(_599){
6198
_599(node,anim);
1318 alexandre_ 6199
}
6200
});
1422 alexandre_ 6201
_59a.push(anim);
1318 alexandre_ 6202
});
1422 alexandre_ 6203
return dojo.lfx.combine(_59a);
1318 alexandre_ 6204
};
1422 alexandre_ 6205
dojo.lfx.html.wipeOut=function(_5a2,_5a3,_5a4,_5a5){
6206
_5a2=dojo.lfx.html._byId(_5a2);
6207
var _5a6=[];
6208
dojo.lang.forEach(_5a2,function(node){
6209
var _5a8={};
1318 alexandre_ 6210
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:function(){
6211
return dojo.html.getContentBox(node).height;
1422 alexandre_ 6212
},end:1}},_5a3,_5a4,{"beforeBegin":function(){
6213
_5a8.overflow=node.style.overflow;
6214
_5a8.height=node.style.height;
1318 alexandre_ 6215
with(node.style){
6216
overflow="hidden";
6217
}
6218
dojo.html.show(node);
6219
},"onEnd":function(){
6220
dojo.html.hide(node);
6221
with(node.style){
1422 alexandre_ 6222
overflow=_5a8.overflow;
6223
height=_5a8.height;
1318 alexandre_ 6224
}
1422 alexandre_ 6225
if(_5a5){
6226
_5a5(node,anim);
1318 alexandre_ 6227
}
6228
}});
1422 alexandre_ 6229
_5a6.push(anim);
1318 alexandre_ 6230
});
1422 alexandre_ 6231
return dojo.lfx.combine(_5a6);
1318 alexandre_ 6232
};
1422 alexandre_ 6233
dojo.lfx.html.slideTo=function(_5aa,_5ab,_5ac,_5ad,_5ae){
6234
_5aa=dojo.lfx.html._byId(_5aa);
6235
var _5af=[];
6236
var _5b0=dojo.html.getComputedStyle;
6237
if(dojo.lang.isArray(_5ab)){
1318 alexandre_ 6238
dojo.deprecated("dojo.lfx.html.slideTo(node, array)","use dojo.lfx.html.slideTo(node, {top: value, left: value});","0.5");
1422 alexandre_ 6239
_5ab={top:_5ab[0],left:_5ab[1]};
1318 alexandre_ 6240
}
1422 alexandre_ 6241
dojo.lang.forEach(_5aa,function(node){
1318 alexandre_ 6242
var top=null;
6243
var left=null;
6244
var init=(function(){
1422 alexandre_ 6245
var _5b5=node;
1318 alexandre_ 6246
return function(){
1422 alexandre_ 6247
var pos=_5b0(_5b5,"position");
6248
top=(pos=="absolute"?node.offsetTop:parseInt(_5b0(node,"top"))||0);
6249
left=(pos=="absolute"?node.offsetLeft:parseInt(_5b0(node,"left"))||0);
1318 alexandre_ 6250
if(!dojo.lang.inArray(["absolute","relative"],pos)){
1422 alexandre_ 6251
var ret=dojo.html.abs(_5b5,true);
6252
dojo.html.setStyleAttributes(_5b5,"position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;");
1318 alexandre_ 6253
top=ret.y;
6254
left=ret.x;
6255
}
6256
};
6257
})();
6258
init();
1422 alexandre_ 6259
var anim=dojo.lfx.propertyAnimation(node,{"top":{start:top,end:(_5ab.top||0)},"left":{start:left,end:(_5ab.left||0)}},_5ac,_5ad,{"beforeBegin":init});
6260
if(_5ae){
1318 alexandre_ 6261
anim.connect("onEnd",function(){
1422 alexandre_ 6262
_5ae(_5aa,anim);
1318 alexandre_ 6263
});
6264
}
1422 alexandre_ 6265
_5af.push(anim);
1318 alexandre_ 6266
});
1422 alexandre_ 6267
return dojo.lfx.combine(_5af);
1318 alexandre_ 6268
};
1422 alexandre_ 6269
dojo.lfx.html.slideBy=function(_5b9,_5ba,_5bb,_5bc,_5bd){
6270
_5b9=dojo.lfx.html._byId(_5b9);
6271
var _5be=[];
6272
var _5bf=dojo.html.getComputedStyle;
6273
if(dojo.lang.isArray(_5ba)){
1318 alexandre_ 6274
dojo.deprecated("dojo.lfx.html.slideBy(node, array)","use dojo.lfx.html.slideBy(node, {top: value, left: value});","0.5");
1422 alexandre_ 6275
_5ba={top:_5ba[0],left:_5ba[1]};
1318 alexandre_ 6276
}
1422 alexandre_ 6277
dojo.lang.forEach(_5b9,function(node){
1318 alexandre_ 6278
var top=null;
6279
var left=null;
6280
var init=(function(){
1422 alexandre_ 6281
var _5c4=node;
1318 alexandre_ 6282
return function(){
1422 alexandre_ 6283
var pos=_5bf(_5c4,"position");
6284
top=(pos=="absolute"?node.offsetTop:parseInt(_5bf(node,"top"))||0);
6285
left=(pos=="absolute"?node.offsetLeft:parseInt(_5bf(node,"left"))||0);
1318 alexandre_ 6286
if(!dojo.lang.inArray(["absolute","relative"],pos)){
1422 alexandre_ 6287
var ret=dojo.html.abs(_5c4,true);
6288
dojo.html.setStyleAttributes(_5c4,"position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;");
1318 alexandre_ 6289
top=ret.y;
6290
left=ret.x;
6291
}
6292
};
6293
})();
6294
init();
1422 alexandre_ 6295
var anim=dojo.lfx.propertyAnimation(node,{"top":{start:top,end:top+(_5ba.top||0)},"left":{start:left,end:left+(_5ba.left||0)}},_5bb,_5bc).connect("beforeBegin",init);
6296
if(_5bd){
1318 alexandre_ 6297
anim.connect("onEnd",function(){
1422 alexandre_ 6298
_5bd(_5b9,anim);
1318 alexandre_ 6299
});
6300
}
1422 alexandre_ 6301
_5be.push(anim);
1318 alexandre_ 6302
});
1422 alexandre_ 6303
return dojo.lfx.combine(_5be);
1318 alexandre_ 6304
};
1422 alexandre_ 6305
dojo.lfx.html.explode=function(_5c8,_5c9,_5ca,_5cb,_5cc){
1318 alexandre_ 6306
var h=dojo.html;
1422 alexandre_ 6307
_5c8=dojo.byId(_5c8);
6308
_5c9=dojo.byId(_5c9);
6309
var _5ce=h.toCoordinateObject(_5c8,true);
6310
var _5cf=document.createElement("div");
6311
h.copyStyle(_5cf,_5c9);
6312
if(_5c9.explodeClassName){
6313
_5cf.className=_5c9.explodeClassName;
1318 alexandre_ 6314
}
1422 alexandre_ 6315
with(_5cf.style){
1318 alexandre_ 6316
position="absolute";
6317
display="none";
1422 alexandre_ 6318
var _5d0=h.getStyle(_5c8,"background-color");
6319
backgroundColor=_5d0?_5d0.toLowerCase():"transparent";
1318 alexandre_ 6320
backgroundColor=(backgroundColor=="transparent")?"rgb(221, 221, 221)":backgroundColor;
6321
}
1422 alexandre_ 6322
dojo.body().appendChild(_5cf);
6323
with(_5c9.style){
1318 alexandre_ 6324
visibility="hidden";
6325
display="block";
6326
}
1422 alexandre_ 6327
var _5d1=h.toCoordinateObject(_5c9,true);
6328
with(_5c9.style){
1318 alexandre_ 6329
display="none";
6330
visibility="visible";
6331
}
1422 alexandre_ 6332
var _5d2={opacity:{start:0.5,end:1}};
1318 alexandre_ 6333
dojo.lang.forEach(["height","width","top","left"],function(type){
1422 alexandre_ 6334
_5d2[type]={start:_5ce[type],end:_5d1[type]};
1318 alexandre_ 6335
});
1422 alexandre_ 6336
var anim=new dojo.lfx.propertyAnimation(_5cf,_5d2,_5ca,_5cb,{"beforeBegin":function(){
6337
h.setDisplay(_5cf,"block");
1318 alexandre_ 6338
},"onEnd":function(){
1422 alexandre_ 6339
h.setDisplay(_5c9,"block");
6340
_5cf.parentNode.removeChild(_5cf);
1318 alexandre_ 6341
}});
1422 alexandre_ 6342
if(_5cc){
1318 alexandre_ 6343
anim.connect("onEnd",function(){
1422 alexandre_ 6344
_5cc(_5c9,anim);
1318 alexandre_ 6345
});
6346
}
6347
return anim;
6348
};
1422 alexandre_ 6349
dojo.lfx.html.implode=function(_5d5,end,_5d7,_5d8,_5d9){
1318 alexandre_ 6350
var h=dojo.html;
1422 alexandre_ 6351
_5d5=dojo.byId(_5d5);
1318 alexandre_ 6352
end=dojo.byId(end);
1422 alexandre_ 6353
var _5db=dojo.html.toCoordinateObject(_5d5,true);
6354
var _5dc=dojo.html.toCoordinateObject(end,true);
6355
var _5dd=document.createElement("div");
6356
dojo.html.copyStyle(_5dd,_5d5);
6357
if(_5d5.explodeClassName){
6358
_5dd.className=_5d5.explodeClassName;
1318 alexandre_ 6359
}
1422 alexandre_ 6360
dojo.html.setOpacity(_5dd,0.3);
6361
with(_5dd.style){
1318 alexandre_ 6362
position="absolute";
6363
display="none";
1422 alexandre_ 6364
backgroundColor=h.getStyle(_5d5,"background-color").toLowerCase();
1318 alexandre_ 6365
}
1422 alexandre_ 6366
dojo.body().appendChild(_5dd);
6367
var _5de={opacity:{start:1,end:0.5}};
1318 alexandre_ 6368
dojo.lang.forEach(["height","width","top","left"],function(type){
1422 alexandre_ 6369
_5de[type]={start:_5db[type],end:_5dc[type]};
1318 alexandre_ 6370
});
1422 alexandre_ 6371
var anim=new dojo.lfx.propertyAnimation(_5dd,_5de,_5d7,_5d8,{"beforeBegin":function(){
6372
dojo.html.hide(_5d5);
6373
dojo.html.show(_5dd);
1318 alexandre_ 6374
},"onEnd":function(){
1422 alexandre_ 6375
_5dd.parentNode.removeChild(_5dd);
1318 alexandre_ 6376
}});
1422 alexandre_ 6377
if(_5d9){
1318 alexandre_ 6378
anim.connect("onEnd",function(){
1422 alexandre_ 6379
_5d9(_5d5,anim);
1318 alexandre_ 6380
});
6381
}
6382
return anim;
6383
};
1422 alexandre_ 6384
dojo.lfx.html.highlight=function(_5e1,_5e2,_5e3,_5e4,_5e5){
6385
_5e1=dojo.lfx.html._byId(_5e1);
6386
var _5e6=[];
6387
dojo.lang.forEach(_5e1,function(node){
6388
var _5e8=dojo.html.getBackgroundColor(node);
1318 alexandre_ 6389
var bg=dojo.html.getStyle(node,"background-color").toLowerCase();
1422 alexandre_ 6390
var _5ea=dojo.html.getStyle(node,"background-image");
6391
var _5eb=(bg=="transparent"||bg=="rgba(0, 0, 0, 0)");
6392
while(_5e8.length>3){
6393
_5e8.pop();
1318 alexandre_ 6394
}
1422 alexandre_ 6395
var rgb=new dojo.gfx.color.Color(_5e2);
6396
var _5ed=new dojo.gfx.color.Color(_5e8);
6397
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:rgb,end:_5ed}},_5e3,_5e4,{"beforeBegin":function(){
6398
if(_5ea){
1318 alexandre_ 6399
node.style.backgroundImage="none";
6400
}
6401
node.style.backgroundColor="rgb("+rgb.toRgb().join(",")+")";
6402
},"onEnd":function(){
1422 alexandre_ 6403
if(_5ea){
6404
node.style.backgroundImage=_5ea;
1318 alexandre_ 6405
}
1422 alexandre_ 6406
if(_5eb){
1318 alexandre_ 6407
node.style.backgroundColor="transparent";
6408
}
1422 alexandre_ 6409
if(_5e5){
6410
_5e5(node,anim);
1318 alexandre_ 6411
}
6412
}});
1422 alexandre_ 6413
_5e6.push(anim);
1318 alexandre_ 6414
});
1422 alexandre_ 6415
return dojo.lfx.combine(_5e6);
1318 alexandre_ 6416
};
1422 alexandre_ 6417
dojo.lfx.html.unhighlight=function(_5ef,_5f0,_5f1,_5f2,_5f3){
6418
_5ef=dojo.lfx.html._byId(_5ef);
6419
var _5f4=[];
6420
dojo.lang.forEach(_5ef,function(node){
6421
var _5f6=new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node));
6422
var rgb=new dojo.gfx.color.Color(_5f0);
6423
var _5f8=dojo.html.getStyle(node,"background-image");
6424
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:_5f6,end:rgb}},_5f1,_5f2,{"beforeBegin":function(){
6425
if(_5f8){
1318 alexandre_ 6426
node.style.backgroundImage="none";
6427
}
1422 alexandre_ 6428
node.style.backgroundColor="rgb("+_5f6.toRgb().join(",")+")";
1318 alexandre_ 6429
},"onEnd":function(){
1422 alexandre_ 6430
if(_5f3){
6431
_5f3(node,anim);
1318 alexandre_ 6432
}
6433
}});
1422 alexandre_ 6434
_5f4.push(anim);
1318 alexandre_ 6435
});
1422 alexandre_ 6436
return dojo.lfx.combine(_5f4);
1318 alexandre_ 6437
};
6438
dojo.lang.mixin(dojo.lfx,dojo.lfx.html);
6439
dojo.kwCompoundRequire({browser:["dojo.lfx.html"],dashboard:["dojo.lfx.html"]});
6440
dojo.provide("dojo.lfx.*");
6441